summaryrefslogtreecommitdiffstats
path: root/src/printsupport
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-06-02 20:37:11 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-06-03 20:37:51 +0000
commit9fea0c613edee452ded1d61174088560cbbde10b (patch)
treeb8ab7576bc56d4b57ad8e89ffea1b48c6f5c0191 /src/printsupport
parent0681a2dd5a8095baddb5905fb21a58ce19b958c5 (diff)
QCOMPARE/QVERIFY: fix huge pessimisation in QTestResult::reportResult
The old code allocated a stack buffer, but asked the runtime to zero-initialize it. That's 1KiB of writes to the stack on every QCOMPARE and QVERIFY before any actual work is done. Fixing this little laissez-faire to just initialize the first character in the buffer results in nice little speedups of ~40%. This fixes the issue in reportResult(), a Cut'n'paste from compare() and verify(), which have since been fixed by a previous commit. Change-Id: I5cad57299490925b88e768dc751304699274db2e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/printsupport')
0 files changed, 0 insertions, 0 deletions