cloudflare / workerd

The JavaScript / Wasm runtime that powers Cloudflare Workers
https://blog.cloudflare.com/workerd-open-source-workers-runtime/
Apache License 2.0
6.11k stars 290 forks source link

introduce swar routines for capitalization #2742

Closed anonrig closed 1 week ago

anonrig commented 1 week ago

Improved the performance of toUpper and toLower functionality by introducing SWAR routines.

vicb commented 1 week ago

I guess the reason to repeat the same code twice (excluding the 2 boundaries) is perf?

vicb commented 1 week ago

Also the one thing I don't get is how overflow is not a problem?

Edit: ASCII = 7 bit, should be ok