Add benchmark suite#526
Merged
Merged
Conversation
Nine modules over the duckdb-python binding hot paths: fetch (OUT-row), arrow, pandas, produce_numpy (df/fetchnumpy columnar), ingest_native (values/executemany), ingest_numpy (numpy scan + analyzer bind), udf (native + vectorized arrow), types_roundtrip (type x direction matrix), cardinality (LIMIT sweep). Full-consume discipline, warmup, real-null gotchas, tracemalloc memory guard. See benchmarks/PLAN.md. Standalone (not yet wired into CI).
Cardinality: the ORDER BY ... LIMIT n sweep let the engine top-N sort dominate and swamp the per-row conversion signal (numbers were non-monotone). Replace it with a pre-materialized fixed source + plain LIMIT n (no sort): the scan early-stops at n rows, so rows-to-Python conversion is the dominant n-varying cost and the slope is monotone; the A/B delta at each n isolates the binding. CI: .github/workflows/codspeed.yml runs the suite under CodSpeed simulation (instruction-count) mode on Linux, tokenless (no dashboard upload; enable the hosted gate later via a CodSpeed project + OIDC/token). Instruction counts are deterministic for every benchmark, so no gated/informational split is needed. Not yet run in CI; the build steps mirror the dev build and need a shakeout.
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.
No description provided.