commit 38028e223d67c7cbc3c8882fe3d6c1408122df98
Author: Haoxiang Fei <feihaoxiang@idea.edu.cn>
Date:
perf(normalization): convert the output and scan clean runs faster on JS
- On JS a FixedArray is an array of numbers, so the output buffer's prefix
converts to a string directly instead of being copied to an exact-length
array first; FixedArray::unsafe_blit copies element by element there,
about 3 ns per code unit. The other backends keep the copy inline, since
out of line it made wasm-gc NFD 10-20% slower.
- JS skips runs below the clean limit with a sticky regular expression,
about three times as fast as testing four code units at a time.
- The wasm-gc block skip compares against U+0200 for NFC instead of ASCII.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>