bench(rust): add criterion.rs benchmarks for evaluation, operators, and state management#66
Merged
Conversation
…nd state management Add comprehensive criterion.rs benchmarks to measure raw Rust evaluation performance, providing a baseline for optimization work. Benchmark suites: - evaluation: flag resolution (static, targeting match/no-match, complex targeting, disabled, not found) and direct JSON Logic evaluation - operators: fractional bucketing (2/4/8 buckets), semver comparison (equals, caret, tilde, gte with prerelease), starts_with, ends_with - state: update_state at varying sizes (5/50/200 flags), no-change detection, and incremental single-flag updates Closes #63 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
…hmarks Align Rust criterion benchmarks with the standardized BENCHMARKS.md matrix: - evaluation.rs: Add E2/E3/E5/E7 context size variation benchmarks (small 5-attr and large 100+ attr contexts) - concurrency.rs: Add C1-C6 multi-threaded benchmarks (1/4/8 threads, targeting, mixed workload, read/write contention) - comparison.rs: Add X1-X2 DataLogic vs FlagEvaluator overhead benchmarks - Cargo.toml: Register new bench targets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
aepfli
added a commit
that referenced
this pull request
Feb 10, 2026
…#67) ## Summary - Adds `BENCHMARKS.md` defining a consistent benchmark specification across Rust, Java, and Python - Covers evaluation scenarios (E1-E11), custom operators (O1-O6), state management (S1-S5), concurrency (C1-C6), and old-vs-new comparison (X1-X3) - Standardizes context shapes and flag definitions for direct cross-language comparison ## Context The benchmark PRs (#64, #65, #66) implement subsets of this matrix. This document serves as the reference spec so all three languages converge on the same scenarios and can be compared meaningfully. ## Test plan - [ ] Review benchmark IDs and scenarios for completeness - [ ] Verify context/flag definitions match what implementations use 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo benchBenchmark Suites
benches/evaluation.rs— Flag Evaluation (8 benchmarks)evaluate_flag_simpleevaluate_flag_targeting_matchevaluate_flag_targeting_no_matchevaluate_flag_complex_targetingevaluate_flag_disabledevaluate_flag_not_foundevaluate_logic_simple{==: [1,1]}evaluate_logic_complexbenches/operators.rs— Custom Operators (8 benchmarks)fractional/buckets/2fractional/buckets/4fractional/buckets/8semver_equalssemver_range/caretsemver_range/tildesemver_range/gte_prereleasestarts_with/ends_withbenches/state.rs— State Management (5 benchmarks)update_state/flags/5update_state/flags/50update_state/flags/200update_state_no_changeupdate_state_incrementalHow to run
Test plan
cargo benchruns successfullycargo fmtandcargo clippypasstarget/criterion/Closes #63
🤖 Generated with Claude Code