Skip to content

WindowThumbnail: reduce allocations when resolving EGL functions

Fushan Wen requested to merge work/fuf/stringview into master

Creating a QByteArray from eglQueryString and splitting a long QByteArray are expensive.

Benchmark: $3117

********* Start testing of SpeedTest *********
Config: Using QtTest library 6.7.0, Qt 6.7.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 13.2.1 20240206 [revision 67ac78caf31f7cb3202177e6428a46d829b70f23]), opensuse-tumbleweed 20240428
PASS   : SpeedTest::initTestCase()
PASS   : SpeedTest::test_sv()
RESULT : SpeedTest::test_sv():
     9,416 nsecs per iteration (total: 9,416, iterations: 1)
     2,415 CPU cycles per iteration, 256 MHz (total: 2,415, iterations: 1)
     5,427 instructions per iteration, 2.247 instr/cycle (total: 5,427, iterations: 1)
     1,562 branch instructions per iteration, 166 M/sec (total: 1,562, iterations: 1)
PASS   : SpeedTest::test_qb()
RESULT : SpeedTest::test_qb():
     19,855 nsecs per iteration (total: 19,855, iterations: 1)
     17,509 CPU cycles per iteration, 882 MHz (total: 17,509, iterations: 1)
     26,627 instructions per iteration, 1.521 instr/cycle (total: 26,627, iterations: 1)
     6,180 branch instructions per iteration, 311 M/sec (total: 6,180, iterations: 1)
PASS   : SpeedTest::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted, 47ms
********* Finished testing of SpeedTest *********
Edited by Fushan Wen

Merge request reports