Add pattern_typecheck bench (Rust typecheck timing on reduced path patterns)#79
Open
Felipe705x wants to merge 2 commits into
Open
Add pattern_typecheck bench (Rust typecheck timing on reduced path patterns)#79Felipe705x wants to merge 2 commits into
Felipe705x wants to merge 2 commits into
Conversation
Times `check_query` on the internal-bench cases reduced to the FPPC path-pattern surface (MATCH/RETURN dropped, query-level WHERE inlined), isolated from the runtime with a reused checker and 1k warmup / 10k iters. Optionally joins the numbers against a reference CSV to print a per-case ratio and geomean, and sanity-checks that each verdict (valid/empty/invalid) matches the reference. Self-contained: default dataset path bench/data/ldbc-sf0.1.gdb, reference CSV passed as an argument (no comparison printed when absent). Only pulls always-on library deps, so it builds under any feature set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The bench now measures only the Rust type checker and writes its own per-case medians to results_rust_typecheck.csv (symmetric to the pygql bench). It no longer reads any reference CSV — comparing against another checker is a separate local join of the two benches' outputs, so neither bench depends on the other's results. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Adds
src/bin/pattern_typecheck.rs, a diagnostic bench that times the Rust type checker in isolation on the internal-bench cases reduced to the FPPC path-pattern surface — for auditability of the §5.4 typecheck comparison.What it measures
Times
check_queryon the reduced cases (MATCH/RETURN dropped, a query-levelWHEREinlined into the descriptor), isolated from the runtime, with a reused checker and 1k warmup / 10k iters. Each case carries an expected verdict (valid/empty/invalid); the bench asserts the checker reproduces it, so a timing is never trusted for a case it classifies unexpectedly.Decoupled by design
The bench measures only Rust and writes its own per-case medians to
results_rust_typecheck.csv, symmetric to the pygqlbench_typecheck.py. It does not read any reference CSV: comparing against another checker is a separate local join of the two benches' outputs, so neither bench depends on the other's results.Usage
Defaults: dataset
bench/data/ldbc-sf0.1.gdb, outputresults_rust_typecheck.csv.Notes
Cargo.tomlentry, norequired-features).cargo fmt --checkandcargo clippy -D clippy::allare clean.🤖 Generated with Claude Code