D15081: replace own wildcard matcher with QRegularExpression combining all wildcards

Christoph Cullmann noreply at phabricator.kde.org
Sat Aug 25 17:13:07 BST 2018


cullmann added a comment.


  Some trivial QBenchmark stuff tells
  
    QBENCHMARK {
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.c"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.sdfdsf"));
              m_repo->definitionForFileName(QLatin1String("ksldjfklsdjfkl.ada"));
              m_repo->definitionForFileName(QLatin1String("12323.cklsjdf"));
          }
  
  tells:
  
  new: between 4 and 5 msecs per iteration
  old: between 5 and 6 msecs per iteration
  
  I think the main issue in the "very old code" was, that we did a QRegExp per extension, not a combined one.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D15081

To: cullmann, vkrause, dhaumann
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180825/13da89b5/attachment.html>


More information about the Kde-frameworks-devel mailing list