diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-08-08 09:19:49 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-08-09 23:57:21 +0200 |
commit | 17dad4b88bcdacc144812d0b63664540177cff77 (patch) | |
tree | a4a07c50cce69c994fd89cb9a2a0b46aa59dffb0 /tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp | |
parent | 445c4adc24d76160706fe755e28228114db97bc3 (diff) |
QMimeDatabase benchmark: measure only what it pertinent
Drag the QCOMPARE (which even dynamically allocated a QString
fromLatin1()) out of the QBENCHMARK loop. Testing performance of
QString::fromLatin1() and/or qCompare() is not pertinent to the task
at hand, which, ideally, doesn't involve any memory allocations, so
there's at least the chance that this skewed the result noticably.
Didn't run the benchmark as this was developed on an asan build.
Yes, this breaks comparability with the stone-age measurements
reported in comments there, so sue me.
As a drive-by, replace the fromLatin1() with a u_s UDL.
Pick-to: 6.6 6.5
Change-Id: I9b2a8b2e3596ec9b07c6b4ea369257b1a86e09db
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto/other/qaccessibilitylinux/tst_qaccessibilitylinux.cpp')
0 files changed, 0 insertions, 0 deletions