D26366: [Kuit] Port QRegExp to QRegularExpression, third pass

David Faure noreply at phabricator.kde.org
Mon Jan 6 22:50:11 GMT 2020


dfaure added a comment.


  So, the old way was 76 times faster than the new regexp :-)
  
  I'm not surprised, though, it's consistent with my experience with regexps.
  
  This might be a good reason to use the manual-search way. Especially now that you tested it for both performance and correctness :-)
  
  I'm also wondering if your regexp is completely correct. `:?(\w*)/?(\w*)` doesn't enforce that one word must be after ':' and one word must be after '/', since the 4 things are optional in an unrelated manner. Admittedly because of \w I can't come up with a string that would be misparsed, so maybe I'm wrong about this. There are ways to express this more strictly in regexp language, but it will only make it more complicated and likely slower :-)

REPOSITORY
  R249 KI18n

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

To: ahmadsamir, #frameworks, ilic, dfaure, mlaurent, aacid
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200106/3c4026d7/attachment.html>


More information about the Kde-frameworks-devel mailing list