D10857: Change qSort to std::sort in simplifiedUrlList

Jaime Torres Amate noreply at phabricator.kde.org
Thu Mar 1 08:24:32 UTC 2018


jtamate planned changes to this revision.
jtamate added a comment.


  I've run David test, it is not a CPU problem:
  
  g++ -fPIC -O2 qsort_performance.cpp -I /usr/include/qt5/QtCore -I/usr/include/qt5 -l Qt5Core
  ./a.out
  "qSort took: 3335 ms"
  "std::sort took: 3452 ms"
  "qSort took: 3285 ms"
  "std::sort took: 3464 ms"
  "qSort took: 3582 ms"
  "std::sort took: 3681 ms"
  "qSort took: 3338 ms"
  "std::sort took: 3646 ms"
  "qSort took: 3635 ms"
  "std::sort took: 3826 ms"
  "qSort took: 3747 ms"
  "std::sort took: 3510 ms"
  "qSort took: 3637 ms"
  "std::sort took: 3590 ms"
  "qSort took: 3418 ms"
  "std::sort took: 3559 ms"
  "qSort took: 3493 ms"
  "std::sort took: 3750 ms"
  "qSort took: 3445 ms"
  "std::sort took: 3545 ms"
  
  Even with a modified test simulating the input data in the call in simpliedUrlList, the results are normal
  F5734576: qsort_performance_test.cpp <https://phabricator.kde.org/F5734576>
  g++ -fPIC -O2 qsort_performance_test.cpp -I /usr/include/qt5/QtCore -I/usr/include/qt5 -l Qt5Core
  ./a.out
  "qSort took: 786 ms"
  "std::sort took: 930 ms"
  "qSort took: 987 ms"
  "std::sort took: 1143 ms"
  "qSort took: 1006 ms"
  "std::sort took: 1188 ms"
  "qSort took: 1039 ms"
  "std::sort took: 1161 ms"
  "qSort took: 1005 ms"
  "std::sort took: 1167 ms"
  "qSort took: 1012 ms"
  "std::sort took: 1171 ms"
  "qSort took: 1026 ms"
  "std::sort took: 1197 ms"
  "qSort took: 1014 ms"
  "std::sort took: 1158 ms"
  "qSort took: 1010 ms"
  "std::sort took: 1162 ms"
  "qSort took: 1012 ms"
  "std::sort took: 1236 ms"
  
  Therefore I'll try to discover why it is so slow, there must be something wrong anywhere, before changing the sort method that hides the problem.

REPOSITORY
  R241 KIO

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

To: jtamate, #frameworks, dfaure, markg
Cc: markg, apol, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180301/826820ee/attachment.html>


More information about the Kde-frameworks-devel mailing list