Go to file
Ritt Konstantin 9f865df5d1 optimize QList::removeAll()
a) don't detach until an occurrence found
b) don't memmove every time an occurrence found
c) truncate quickly )

well, numbers are better than words:
before:
RESULT : tst_QList::removeAll_primitive():
     2,617,902 CPU ticks per iteration (total: 261,790,171, iterations: 100)
RESULT : tst_QList::removeAll_movable():
     2,547,540 CPU ticks per iteration (total: 254,753,960, iterations: 100)
RESULT : tst_QList::removeAll_complex():
     16,852,099 CPU ticks per iteration (total: 1,685,209,906, iterations: 100)

after:
RESULT : tst_QList::removeAll_primitive():
     73,520 CPU ticks per iteration (total: 73,520,442, iterations: 1000)
RESULT : tst_QList::removeAll_movable():
     90,422 CPU ticks per iteration (total: 90,422,464, iterations: 1000)
RESULT : tst_QList::removeAll_complex():
     9,667,073 CPU ticks per iteration (total: 9,667,072,670, iterations: 1000)

Merge-request: 1285
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

(cherry picked from commit b209fe3b1a51f64541067917e96de99f14ad65f3)

Change-Id: Ia26036ed741cefcf4b5868b7b2fc5eae8130d3dc
Reviewed-on: http://codereview.qt-project.org/4577
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-09-12 16:03:47 +02:00
bin Partially revert 25a0cf881e 2011-09-07 07:17:08 +02:00
config.profiles Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
config.tests Fix fontconfig configure test 2011-08-29 16:28:17 +02:00
dist added QMAKE_MOC_OPTIONS variable to qmake 2011-09-07 19:04:20 +02:00
doc/src Add flag for non-recursive lookup of child qobject(s) 2011-08-15 13:37:49 +02:00
examples Compile fix on Mac OS X 2011-08-30 15:27:19 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs sync win32-g++-cross with win32-g++ (lib prefix and extension) 2011-09-12 16:03:47 +02:00
qmake qsystemlibrary needs no special treatment 2011-09-12 16:03:47 +02:00
src optimize QList::removeAll() 2011-09-12 16:03:47 +02:00
tests optimize QList::removeAll() 2011-09-12 16:03:47 +02:00
tools configure on Windows: Store result of V8 configuration 2011-09-09 16:01:35 +02:00
util drop an obsolete QChar::NoCategory enum value 2011-07-13 13:31:13 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore update gitignore 2011-09-12 16:03:47 +02:00
.gitmodules Add QtV8 library to QtBase 2011-08-29 10:16:01 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure Fixed compilation of QtV8 for mac 2011-09-07 02:28:29 +02:00
configure.exe New configure.exe binary 2011-09-05 08:55:31 +02:00
header.BSD Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
header.FDL Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
header.LGPL Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
header.LGPL-ONLY Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
INSTALL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Fix make confclean 2011-09-12 16:03:47 +02:00
sync.profile Add QtV8 library to QtBase 2011-08-29 10:16:01 +02:00