Skip to content

feat(text): wire D-245 SIMD kernels to production consumers (11.14 layer 4) - #70

Open
thejustinwalsh wants to merge 2 commits into
feat/justification-controlsfrom
feat/simd-line-kernels
Open

feat(text): wire D-245 SIMD kernels to production consumers (11.14 layer 4)#70
thejustinwalsh wants to merge 2 commits into
feat/justification-controlsfrom
feat/simd-line-kernels

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

What

Layer 4 of the 11.14 typography tier: two of D-245's lab-admitted SIMD kernels graduate to production consumers in engine/line_kernels.rs.

Kernel Consumer Lab evidence
Transition masks the bidi run scan — sixteen levels per step instead of a per-unit compare 4.8×
Flag masks the justification space scan over the new CLUSTER_SPACE flag 7.6× (as break-opportunity masks)

Shape and proof

Each kernel is one scalar function with a cfg(simd128) sixteen-lane prefix and a scalar tail, so native builds and Wasm builds agree exactly. Boundary-sweeping parity tests prove the scalar path against naive scans across 15/16/17-index block boundaries; the shipped simd128 Wasm exercises the SIMD path through every layout integration test. CLUSTER_SPACE also replaces per-cluster text lookups everywhere justification detects spaces, and the dead text plumbing through the justification and measurement chains is removed.

Chunk-64 advance summaries stay lab-admitted, with the reason recorded in D-245: exact parity for whole-chunk width arithmetic needs a fixed-point cluster-advance representation first, scheduled with the editorial performance pass.

…yer 4)

Transition masks drive the bidi run scan and flag masks drive the
justification space scan, each graduated from the kernel lab into
engine/line_kernels.rs as a scalar function with a cfg(simd128)
sixteen-lane prefix and scalar tail. The CLUSTER_SPACE flag replaces
per-cluster text lookups everywhere justification detects spaces, and
the dead text plumbing through the justification and measurement
chains is gone. Boundary-sweeping parity tests prove the scalar path;
the shipped simd128 wasm exercises the SIMD path through every layout
integration test. Chunk-64 advance summaries stay lab-admitted with
the fixed-point prerequisite recorded in D-245.
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
Core JS (gzip) 18.47 KB (0%)
Shaper Wasm (gzip) 418.49 KB (+0.03% 🔺)
Three.js adapter JS (gzip) 60.38 KB (0%)
Inter font · Bitmap (gzip) 545.27 KB (0%)
Inter font · MTSDF (gzip) 6.48 MB (0%)
Inter font · Slug (gzip) 604.06 KB (0%)
Font Awesome icons · Bitmap (gzip) 439.53 KB (0%)
Font Awesome icons · MTSDF (gzip) 6.89 MB (0%)
Font Awesome icons · Slug (gzip) 642.64 KB (0%)
Font validator JS (gzip) 134.24 KB (0%)
Runtime bake host JS (gzip) 5.38 KB (0%)
Runtime bake Worker JS (gzip) 142.45 KB (0%)
Font baker JS (gzip) 2.41 KB (0%)
Font baker Wasm (gzip) 379.63 KB (0%)
Bitmap baker JS (gzip) 4.66 KB (0%)
Bitmap baker Wasm (gzip) 228.31 KB (0%)
MTSDF baker JS (gzip) 5.39 KB (0%)
MTSDF baker Wasm (gzip) 209.22 KB (0%)
Slug baker JS (gzip) 4.01 KB (0%)
Slug baker Wasm (gzip) 181.24 KB (0%)

@thejustinwalsh
thejustinwalsh marked this pull request as ready for review August 14, 2026 02:36
# Conflicts:
#	docs/packages/benchmarks.md
#	docs/packages/glyph.md
#	docs/planning/decision-register.md
#	packages/glyph/rust/shaper/src/engine/line_kernels.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant