Skip to content

X11OutputOrderWatcher: use values_view to reduce allocations

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

Benchmark: https://invent.kde.org/-/snippets/3115

Result:

********* 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_transform()
RESULT : SpeedTest::test_transform():
     11,403 nsecs per iteration (total: 11,403, iterations: 1)
     694 CPU cycles per iteration, 60.9 MHz (total: 694, iterations: 1)
     360 instructions per iteration, 0.519 instr/cycle (total: 360, iterations: 1)
     72 branch instructions per iteration, 6.31 M/sec (total: 72, iterations: 1)
PASS   : SpeedTest::test_ranges()
RESULT : SpeedTest::test_ranges():
     5,519 nsecs per iteration (total: 5,519, iterations: 1)
     283 CPU cycles per iteration, 51.3 MHz (total: 283, iterations: 1)
     325 instructions per iteration, 1.148 instr/cycle (total: 325, iterations: 1)
     63 branch instructions per iteration, 11.4 M/sec (total: 63, iterations: 1)
PASS   : SpeedTest::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted, 39ms
********* Finished testing of SpeedTest *********
Edited by Fushan Wen

Merge request reports