summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global
diff options
context:
space:
mode:
authorIgor Kushnir <igorkuo@gmail.com>2021-04-04 12:57:49 +0300
committerIgor Kushnir <igorkuo@gmail.com>2021-04-25 13:25:01 +0300
commit7c9597ef56f4df7bf2201a880906256b483d01c5 (patch)
tree816ce7c3ca1f6210e27a024e292bf1fdaa7d0f19 /tests/auto/corelib/global
parent49609f58a58c938d74a3cb300633f914d5334dda (diff)
Add QSortFilterProxyModel clear-filter benchmark
Use QBENCHMARK_ONCE rather than QBENCHMARK to avoid skewing the results: when the QBENCHMARK block is repeated multiple times after the setup code above runs once, only the first setFilterRegularExpression() call unfilters some rows, while the subsequent calls simply check that there is nothing to do. The added benchmark is sensitive to the inefficiency - quadratic rather than linear time complexity - fixed by 7d92ef63d7c2d9d017d89905a2ee0d1e9226b15c. The following two tables contain the benchmark results on my GNU/Linux system. The numbers denote milliseconds per iteration. 1. Qt 5.15.2 without the performance fix: 10K 25K 50K 100K 250K 500K no match 0 1 2 5 14 28 all 0 0 0 1 3 7 first 0 1 2 5 14 28 1000th 2 6 12 25 68 302 middle 3 34 132 518 3300 13665 1000th from end 1 4 9 19 50 103 last 0 1 2 5 14 30 each 10'000th 0 39 211 937 6326 41050 each 100'000th 0 1 2 5 4226 34780 Without the fix the benchmark times out and aborts at 1000K and 2000K data rows. 2. Qt 5.15.2 with the performance fix: 10K 25K 50K 100K 250K 500K 1000K 2000K no match 0 1 2 4 12 26 56 136 all 0 0 0 1 3 7 14 28 first 0 1 2 4 12 26 56 136 1000th 0 1 2 4 13 28 62 145 middle 0 1 2 4 13 27 59 142 1000th from end 0 1 2 4 13 28 60 145 last 0 1 2 4 13 27 59 141 each 10'000th 0 1 2 6 22 69 290 1413 each 100'000th 0 1 2 4 13 30 81 261 Change-Id: I419a5521dd0be7676fbb09b34b4069d4a76423b1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'tests/auto/corelib/global')
0 files changed, 0 insertions, 0 deletions