mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-11 22:22:31 +00:00
eb37158db4f44440780c2e447a10a8ec398908d7
Audit findings 10 (storytold/wordcraft#3657) and 15 (storytold/wordcraft#3692). - ru::hyphen::points: the cuts come in increasing order, so a repeat can only be the last one; compare with `out.last()` instead of `out.contains` per syllable (O(V^2) on a long Cyrillic word, during layout). - hyphenate_word_in: walk the sorted break points alongside the chars instead of searching the point list for every char. Same output. Test: russian_hyphenation_and_hyphenated_output_are_linear (8x the letters costs ~8x; the old code measured 31x and 30x). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Languages
Rust
99%
Max
0.7%
Python
0.3%