summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/tools/qlist/qlist.pro
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2011-07-13 18:14:38 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-12 16:03:47 +0200
commit9f865df5d1bd98b8fd43e72c1d0c21f42ae3afec (patch)
tree4c4718ced449ec75d2e0f30399d8433d9ef1a4b4 /tests/benchmarks/corelib/tools/qlist/qlist.pro
parent50e91bcd275fa0e58635e9d5102d130f37133492 (diff)
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>
Diffstat (limited to 'tests/benchmarks/corelib/tools/qlist/qlist.pro')
-rw-r--r--tests/benchmarks/corelib/tools/qlist/qlist.pro5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/tools/qlist/qlist.pro b/tests/benchmarks/corelib/tools/qlist/qlist.pro
new file mode 100644
index 0000000000..902e72eb2e
--- /dev/null
+++ b/tests/benchmarks/corelib/tools/qlist/qlist.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+TARGET = tst_qlist
+QT = core
+
+SOURCES += main.cpp