commit 90bbb7dd05a30be11b19b1664b18c2e3d0e66e6b
Author: Haoxiang Fei <feihaoxiang@idea.edu.cn>
Date:
fix(normalization): make the clean-run skip robust on x86 and wasm-gc
After #87, native NFC on clean ASCII and Latin text took 60-86% longer
on the x86 CI runners, though the scan's C code was unchanged: the
tables commit alone moved the loop and slowed it from about 2.5 to 4
cycles per eight units. The native skip now subtracts limit - 1 with
saturation, one instruction on SSE2, and tests sixteen units per step.
wasm keeps the one-block comparison, since sixteen units per step made
Cyrillic NFD 30-38% slower in V8.
On wasm-gc the block skip called clean_unit_limit on every call, which
moonc keeps as a call; NFD and NFKD were 5-15% slower on x86. The limit
is now tested inline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>