Skip to content

feat: OP_LEN_HAS_K_COUNT peephole closes bio canonical perf gate#368

Merged
danieljohnmorris merged 2 commits into
mainfrom
fix/bio-inner-flt-closure-inline
May 17, 2026
Merged

feat: OP_LEN_HAS_K_COUNT peephole closes bio canonical perf gate#368
danieljohnmorris merged 2 commits into
mainfrom
fix/bio-inner-flt-closure-inline

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

Closes the parked bio canonical 5.6s perf gate via a peephole-fused opcode. Predicted ~7s reduction in the bio hot loop.

Peephole-fuses 'len (flt has-K-pred xs)' to a single VM opcode that
walks the list doing haystack.contains() per element in tight Rust.
Eliminates ~165M opcode dispatches in the bio canonical hot loop.
Predicate-body inliner extended to accept 2-word ops so the fast path
itself inlines into outer flt loops.

Files: src/vm/mod.rs (op + matcher + dispatcher + inliner),
src/vm/jit_cranelift.rs + src/vm/compile_cranelift.rs (numeric-output),
examples/len-flt-has-k-count.ilo, tests/regression_len_flt_has_k_count.rs
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

❌ Patch coverage is 79.45205% with 30 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/vm/mod.rs 79.02% 30 Missing ⚠️

📢 Thoughts on this report? Let us know!

@danieljohnmorris danieljohnmorris merged commit cb12fd5 into main May 17, 2026
4 of 5 checks passed
@danieljohnmorris danieljohnmorris deleted the fix/bio-inner-flt-closure-inline branch May 17, 2026 20:59
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