Skip to content

Improve processing performance

Waqar Ahmed requested to merge work/more-optm into master

This is another effort to improve performance.

Benchmarks with vtebench


BEFORE

AFTER

cursor_motion (528 samples @ 1.22 MiB): 18.46ms avg (90% < 20ms) +-1.64ms

dense_cells (353 samples @ 1.29 MiB): 27.91ms avg (90% < 36ms) +-7.86ms

light_cells (511 samples @ 1 MiB): 19.1ms avg (90% < 21ms) +-1.94ms

scrolling (20 samples @ 1 MiB): 436.8ms avg (90% < 449ms) +-10.92ms

scrolling_bottom_region (44 samples @ 1 MiB): 231.34ms avg (90% < 237ms) +-3.15ms

scrolling_bottom_small_region (45 samples @ 1 MiB): 225.2ms avg (90% < 229ms) +-4.93ms

scrolling_fullscreen (83 samples @ 1 MiB): 38.4ms avg (90% < 41ms) +-4.2ms

scrolling_top_region (44 samples @ 1 MiB): 228.43ms avg (90% < 232ms) +-2.85ms

scrolling_top_small_region (46 samples @ 1 MiB): 221.63ms avg (90% < 226ms) +-2.87ms

unicode (276 samples @ 1.06 MiB): 35.79ms avg (90% < 55ms) +-41.27ms

cursor_motion (573 samples @ 1.22 MiB): 16.95ms avg (90% < 19ms) +-1.85ms

dense_cells (379 samples @ 1.29 MiB): 25.91ms avg (90% < 35ms) +-8.02ms

light_cells (707 samples @ 1 MiB): 13.77ms avg (90% < 15ms) +-1.18ms

scrolling (24 samples @ 1 MiB): 354.5ms avg (90% < 361ms) +-5.01ms

scrolling_bottom_region (85 samples @ 1 MiB): 117.79ms avg (90% < 122ms) +-4.42ms

scrolling_bottom_small_region (86 samples @ 1 MiB): 116.08ms avg (90% < 119ms) +-2.71ms

scrolling_fullscreen (106 samples @ 1 MiB): 28.55ms avg (90% < 33ms) +-3.24ms

scrolling_top_region (76 samples @ 1 MiB): 131.88ms avg (90% < 143ms) +-10.44ms

scrolling_top_small_region (84 samples @ 1 MiB): 119.21ms avg (90% < 131ms) +-7.76ms

unicode (342 samples @ 1.06 MiB): 28.74ms avg (90% < 52ms) +-41.12ms

Benchmark with termbench

BEFORE

CPU: AMD Ryzen 7 4700U with Radeon Graphics
VT support: no
ManyLine: 6.8625s (0.0091gb/s)
LongLine: 2.1697s (0.0288gb/s)
FGPerChar: 0.3569s (0.0508gb/s)
FGBGPerChar: 0.7919s (0.0445gb/s)
TermMarkV2 Small: 10.1810s (0.0175gb/s)

real    0m11.022s
user    0m0.951s
sys     0m2.883s

AFTER

CPU: AMD Ryzen 7 4700U with Radeon Graphics         
VT support: no
ManyLine: 5.2654s (0.0119gb/s)
LongLine: 1.6589s (0.0377gb/s)
FGPerChar: 0.3188s (0.0569gb/s)
FGBGPerChar: 0.7324s (0.0481gb/s)
TermMarkV2 Small: 7.9755s (0.0224gb/s)

real    0m8.797s
user    0m0.939s
sys     0m3.143s

With the one file that I have been measuring performance throughout, these changes show a + ~700ms improvement.

Edited by Waqar Ahmed

Merge request reports