Skip to content

move term interning caches into TermCache - #3

Merged
yazaldefilimone merged 1 commit into
mainfrom
feat/decode-prefer
Oct 18, 2026
Merged

yazaldefilimone merged 1 commit into
mainfrom
feat/decode-prefer

Conversation

@yazaldefilimone

Copy link
Copy Markdown
Owner

Extract the variable/lambda/apply hash-consing tables out of Term into TermCache behind a small intern API. Fixes the missing-field build error. Variables now use a dense Vec with a TermId::EMPTY sentinel and apply keys are packed into a u64. Semantics unchanged.

Extract the variable/lambda/apply hash-consing tables out of Term into
TermCache behind a small intern API. Fixes the missing-field build error.
Variables now use a dense Vec<TermId> with a TermId::EMPTY sentinel and
apply keys are packed into a u64. Semantics unchanged.
@github-actions

Copy link
Copy Markdown

Benchmark for eefce42

Click to view benchmark
Test Base PR %
eval/arithmetic 2.7±0.03µs 2.9±0.03µs +7.41%
eval/booleans 1228.4±34.93ns 1245.7±12.09ns +1.41%
eval/deep 5.5±0.04µs 5.9±0.03µs +7.27%
eval/factorial 330.0±8.70µs 320.7±3.65µs -2.82%
eval/pred 4.5±0.06µs 4.9±0.06µs +8.89%
eval/skk 856.4±5.69ns 916.5±11.15ns +7.02%
lex/arithmetic 1530.0±34.34ns 1350.0±17.89ns -11.76%
lex/deep 766.0±19.06ns 780.7±5.01ns +1.92%
lex/factorial 2.3±0.03µs 2.2±0.03µs -4.35%
lex/list 2.3±0.07µs 2.1±0.04µs -8.70%
lex/pred 1484.2±17.44ns 1438.4±37.10ns -3.09%
parse/arithmetic 1441.5±34.42ns 1384.7±37.71ns -3.94%
parse/deep 863.9±17.17ns 837.2±16.15ns -3.09%
parse/factorial 2.2±0.02µs 2.2±0.03µs 0.00%
parse/list 1720.6±56.09ns 1718.5±18.44ns -0.12%
parse/pred 1565.0±19.38ns 1603.1±16.81ns +2.43%

@yazaldefilimone
yazaldefilimone merged commit a67a64e into main Oct 18, 2026
3 checks passed
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