Skip to content

compiler: implement unrolled linked list for bindings#581

Merged
pdubroy merged 9 commits intomainfrom
pdubroy/binding-chunk-alloc
Mar 5, 2026
Merged

compiler: implement unrolled linked list for bindings#581
pdubroy merged 9 commits intomainfrom
pdubroy/binding-chunk-alloc

Conversation

@pdubroy
Copy link
Contributor

@pdubroy pdubroy commented Mar 5, 2026

  • Unrolled linked list for bindings (can be disabled via OHM_FLAGS=--noChunkedBindings

parseLiquid

Before After
JS parse: 2448ms ± 64ms (n=3)
Wasm parse: 49ms ± 1ms (n=3)
Speedup: 50.04x
Compile: 43ms
Compiled grammar size: 140.0 KB
Peak Wasm heap usage: 5.75 MB
Peak Wasm linear memory: 10.00 MB
JS parse: 2397ms ± 58ms (n=3)
Wasm parse: 41ms ± 1ms (n=3)
Speedup: 58.45x
Compile: 41ms
Compiled grammar size: 144.9 KB
Peak Wasm heap usage: 5.72 MB
Peak Wasm linear memory: 10.00 MB

es5bench-wasm

Before After
Compile: 70ms
JS match: 4076.9ms ± 427.2ms (n=3)
Wasm match: 103.3ms ± 40.5ms (n=3)
Wasm vs JS match: 39.5x
Wasm memory: 174.0MB
Compile: 63ms
JS match: 4005.3ms ± 348.7ms (n=3)
Wasm match: 87.5ms ± 35.4ms (n=3)
Wasm vs JS match: 45.8x
Wasm memory: 174.0MB

@pdubroy pdubroy merged commit 3436ea8 into main Mar 5, 2026
3 checks passed
@pdubroy pdubroy deleted the pdubroy/binding-chunk-alloc branch March 5, 2026 19:58
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