Massive performance improvement for scrolling
BEFORE
CPU: AMD Ryzen 7 4700U with Radeon Graphics
VT support: no
ManyLine: 5.8475s (0.0107gb/s)
LongLine: 1.6646s (0.0375gb/s)
FGPerChar: 0.3015s (0.0602gb/s)
FGBGPerChar: 0.6152s (0.0573gb/s)
TermMarkV2 Small: 8.4289s (0.0212gb/s)
real 0m9.222s
user 0m0.896s
sys 0m2.216s
AFTER
CPU: AMD Ryzen 7 4700U with Radeon Graphics
VT support: no
ManyLine: 1.9642s (0.0318gb/s)
LongLine: 1.7874s (0.0350gb/s)
FGPerChar: 0.3099s (0.0585gb/s)
FGBGPerChar: 0.6400s (0.0551gb/s)
TermMarkV2 Small: 4.7015s (0.0379gb/s)
real 0m5.463s
user 0m0.951s
sys 0m1.830s
Note that we sacrifice a bit for long lines to gain a lot more for small lines. This change makes us almost as fast as alacritty in terms of scrolling performance.