vte icon indicating copy to clipboard operation
vte copied to clipboard

SIMD Acceleration

Open jwilm opened this issue 2 months ago • 1 comments

It looks like Kitty added support for SIMD escape parsing last year and gained a massive performance increase from it. We should add support in vte. This library has become the foundation for a lot of ANSI parsing projects in Rust, and the impact would be felt well beyond alacritty. I may or may not start messing around with this in my extremely limited free time, but thought I'd throw a thread up here for discussion / work tracking.

Also hi guys it's been a while 😄

jwilm avatar Oct 10 '25 15:10 jwilm

Also hi guys it's been a while 😄

Always nice to see you around. 😄

I did actually look into this for the same reason you've mentioned, which is where this patch came from: https://github.com/alacritty/vte/commit/7321a442a6fc0fc5b6d6ed7af364477d25e706fd

I just took the easy route of using memchr for everything that looks ahead multiple bytes since I know that should make use of simd where possible similar to what Kitty does. That said, it didn't improve performance much, since the actual escapes themselves often branch out pretty broadly so it's only used to skip over stuff mostly.

chrisduerr avatar Oct 10 '25 15:10 chrisduerr