Repository navigation
Conversation
This was referenced Oct 20, 2026
…gainst npm latest
…for several runtimes
This was referenced Oct 21, 2026
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.
Closes #2741
A framework in
test/performance/to measure every AlaSQL release on npm, one self-contained page that presents the results, and a command that tells whether the current build got slower than the latest release.What is in it
historical/:bench.jsresults on Bun and on Node for every npm release that can run the benchmark (198 releases, 0.0.16 to 4.20.1), and fordevelopat 787cb25, the baseline for the v5 work. The README lists the few releases that are left out.results.html: one HTML file with everything inlined: a speed index per release, the steps that mattered, a section per dimension with a chart per case, the full table, and a "Copy LLM recap" button. Theion every chart opens it larger with the SQL and what the case tests, why it matters and how to read it. All numbers come from one JSON block in the file.bench.js: the ten core cases as before, plus 22 dimensions indimensions/(set operations, subqueries, the Slow query performance when dealing with a subquery #937 shape, LEFT JOIN, full sorts, GROUP BY cardinality, compile, correlated subqueries, mutations, predicate order, four-table joins, window functions, CTEs, nested JSON and SEARCH, UDFs, output modifiers, indexes, constraints and triggers, object shapes, coercion, memory, export).--scale=<x>multiplies every loop.history.js:rundownloads releases from npm, runs groups on them and merges the medians intohistorical/;pagerebuilds the data block ofresults.html.vs-npm.js:yarn test-perfruns every group ondist/and on npm latest, interleaved, and prints one score (npm latest = 100, higher is slower), the change per runtime and per dimension, and the cases that changed most.--base,--target,--scale,--runs,--runtime,--fail-above.yarn test-perf-miniis--scale=0.5 --runs=2 --runtime=node --fail-above=105, a quick check of about 2 minutes. Neither runs in CI: shared runners are too noisy.How a dimension is measured
Each group runs in its own process: a case alone can be up to 4 times faster than after other cases, so numbers only compare within a group. A dimension has seeded data, a sink, adaptive iterations and, for large allocations, the heap left after a run. Its answers are checked against develop's (
expected.json): a build that answers differently is not timed and shows as "wrong answer". That already caught a wrong three-wayUNION ALLin 4.0.0.Noise, measured with develop against itself: the score moves by about 2, a dimension by up to about 10 percent, single cases more.
Findings filed from the data
#2736, #2737, #2738 (4.17.1 on Bun), #2739 (ORDER BY with LIMIT in 4.0.0), #2740 (WHERE filter in 0.3.2), #2744 (UNION is N × M and keeps duplicates of the second SELECT), #2745 (EXCEPT and INTERSECT with
SELECT *on parameter arrays), #2746 (indexes are not used for WHERE), and #2731 (published builds report the previous version, fixed in #2732). #937 is still there: EXISTS over a derived table takes about 1,000 times longer than the JOIN.The history of the 22 dimensions is being measured on all releases and goes into this branch when it is done.
This PR supersedes #2733.