8000 feat(bench): SIMD benchmarking and crossover analysis (#229) by adityamukho · Pull Request #253 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

feat(bench): SIMD benchmarking and crossover analysis (#229) - #253

Merged
adityamukho merged 15 commits into
mainfrom
feature/issue-229-simd-benchmarking
May 16, 2026
Merged

adityamukho merged 15 commits into
mainfrom
feature/issue-229-simd-benchmarking

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Summary

  • Adds wide 0.7 as a non-WASM dev-dependency (zero production binary size impact)
  • New benches/simd_helpers.rs: valid_time_filter_simd, as_of_filter_simd, sum_simd_i64 with 10 unit tests
  • Three new Criterion benchmark groups: simd_temporal, simd_as_of, simd_aggregate — each at 5 dataset sizes (100 → 1M), scalar vs SIMD side-by-side
  • docs/simd-analysis.md: crossover findings and final recommendation

Key findings

  • Filter SIMD (valid_time_filter_simd, as_of_filter_simd): SIMD slower than scalar at all sizes — LLVM autovectorization already captures available gains; recommendation is Skip
  • Aggregate SIMD (sum_simd_i64): 2–2.8× speedup at all sizes — real gain, but production adoption requires struct-of-arrays storage layout; recommendation is Revisit with SoA layout

Closes #229

Test plan

  • All existing tests pass (cargo test)
  • 10 new unit tests for SIMD helpers (scalar equivalence at all sizes)
  • SIMD benchmark groups compile and run (cargo bench -- simd)
  • cargo clippy -- -D warnings clean
  • cargo fmt --check clean
  • WASM build unaffected

🤖 Generated with Claude Code

adityamukho and others added 15 commits May 15, 2026 15:19
…le optimization)

Covers issues #207 and #206: extends optimizer::plan() to accept Expr
clauses and interleave them at the earliest position where their variables
are bound, and routes the StratifiedEvaluator mixed-rules path through
the updated planner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d rules)

TDD plan covering optimizer.rs, matcher.rs, executor.rs, evaluator.rs,
and a new Criterion benchmark. 9 tasks, each with exact file paths,
code blocks, and expected test output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…#205)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a concise 'WASM omission' comment at every existing and planned
#[cfg(not(feature = "wasm"))] ordering gate explaining why sorting is
disabled on WASM targets (small datasets, deterministic behaviour).
The full rationale lives in the selectivity_score() doc comment;
all other sites reference it with a short cross-reference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace todo!() stubs with wide 0.7 implementations: valid_time_filter_simd
(i64x4 with CmpGt/Not/move_mask), as_of_filter_simd (u64x4), and
sum_simd_i64 (i64x4 accumulator). All 10 unit tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…groups (#229)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
codecov Bot commented May 16, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit aa440ef into main May 16, 2026
36 checks passed
@adityamukho
adityamukho deleted the feature/issue-229-simd-benchmarking branch May 16, 2026 11:46
adityamukho added a commit that referenced this pull request May 17, 2026
Wave 2 (PRs #249, #251, #253) was missing from CHANGELOG.md, ROADMAP.md,
and TEST_COVERAGE.md:

- CHANGELOG.md: add Wave 2 section between Wave 3 and Wave 1 entries
- ROADMAP.md: add Wave 2 to timeline between Wave 1 and Wave 3
- TEST_COVERAGE.md: add Wave 2 completion status note (no new tests —
  all optimizer + benchmark work covered by existing 850 tests)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Benchmark SIMD vectorization gains vs current scalar implementation

1 participant

0