Skip to content

Commit c6fd3a7

Browse files
committed
Align fold_haswell, upper_haswell, upper_ice to fold_ice canonical ordering
Use fold_ice's branch ordering as the canonical pipeline (most mature path from upstream). Apply the same priority sequence to all three derivative functions for maintainability and consistency. Canonical pipeline: ASCII β†’ Latin-1 (C3) β†’ Cyrillic basic (D0/D1) β†’ Greek (CE/CF) β†’ Caseless 2-byte D7-DF (Ice only) β†’ Cyrillic Supplement (D1-ext/D2/D3/D4) β†’ Universal 2-byte (Ice only) β†’ 3-byte caseless β†’ Nuskhuri/Asomtavruli (E2 B4 ↔ E1 82/83) β†’ Mkhedruli/Mtavruli (E1 83 ↔ E1 B2) β†’ Latin Extended Additional (E1 B8-BB) β†’ Fullwidth (EF BC/BD) β†’ Serial drain Per-function moves: fold_haswell: - Swap Cyrillic Supplement ↔ Greek (Greek first). - Move 3-byte caseless from tail to after Cyrillic Supplement. upper_haswell: - Same swap and same 3-byte caseless move. - Swap Mkhedruli ↔ Nuskhuri so Nuskhuri runs first. upper_ice: - Move 3-byte caseless from position 2 (right after ASCII) to position 9 (after all 2-byte branches). - Move Greek from after Cyrillic Supplement to before it. - Swap Mkhedruli ↔ Nuskhuri so Nuskhuri runs first. Verified bit-perfect haswell-vs-serial and ice-vs-serial across all 1.1M codepoints β€” 0 diffs. Bench (Intel Xeon Platinum 8375C, 32 MiB, best of 7): ASCII upper: serial 1.21 β†’ haswell 9.79 (Γ—8.1), ice 9.08 (Γ—7.5) Cyrillic upper: serial 0.29 β†’ haswell 3.78 (Γ—13.1), ice 4.50 (Γ—15.5) Greek upper: serial 0.43 β†’ haswell 2.82 (Γ—6.6), ice 3.84 (Γ—9.0) Mixed upper: serial 0.78 β†’ haswell 5.38 (Γ—6.9), ice 6.24 (Γ—8.0) CJK upper: serial 0.29 β†’ haswell 3.27 (Γ—11.2), ice 2.45 (Γ—8.4) Note: heavily-interleaved scripts (a pattern alternating D2/D3/D4 Cyrillic Supplement leads byte-by-byte) make every chunk advance only 2-4 bytes through the per-lead fast paths, and the per-iteration pre-checks dominate. This is a pipeline-architecture property, not a regression β€” pure D2-only Cyrillic Supplement still runs at 3.5 GB/s in Ice.
1 parent 5404ddd commit c6fd3a7

1 file changed

Lines changed: 445 additions & 468 deletions

File tree

0 commit comments

Comments
Β (0)