commit d24628790fcc79ded1cbd9e63107f4236564498c
Author: Haoxiang Fei <feihaoxiang@idea.edu.cn>
Date:
refactor(casefold): keep the ASCII rule in one helper and skip extra copies
- Fold ASCII through one ascii_fold helper instead of three copies of the
A-Z rule, and check in the generator that both tables fold ASCII that way.
- Split folding into first_change and fold_from, so nfkc_casefold passes
unchanged input straight to NFC and copies it once instead of twice.
- In caseless_match, step over equal code units before decoding anything,
which halves the time for equal strings.
- Check code units for ASCII before decoding in the folding loops; routing
ASCII through the shared per-code-point helper made case_fold 1.7x slower.