Skip to content

Commit 85d00f5

Browse files
committed
chore: refresh benchmark and corpus results
Key improvements vs March baseline (86467 queries total): - PARTIAL queries: 1106 → 53 (−1053) - OK queries: 85341 → 86394 (+1053) - ERROR count: 20 (unchanged — same edge cases) - Full corpus success: 99.977% → 99.977% - Vitess, sqlparser-rs PostgreSQL/Common now at 100%
1 parent 1f65334 commit 85d00f5

1 file changed

Lines changed: 65 additions & 56 deletions

File tree

docs/benchmarks/latest.md

Lines changed: 65 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,105 @@
11
# SQL Parser Performance Report
22

3-
**Date:** 2026-03-25 00:53 UTC
3+
**Date:** 2026-04-14 13:26 UTC
44
**Host:** ci-big6-202511.vm
55
**CPU:** AMD Ryzen 9 5950X 16-Core Processor
66
**OS:** Linux 6.17.0-14-generic
77
**Compiler:** g++ (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
8-
**Git:** main @ 3fcb504
9-
**Unit tests:** 430 passing
8+
**Git:** main @ 1f65334
9+
**Unit tests:** 1160 passing
1010

1111
---
1212

1313
## Benchmark Results (Release -O3)
1414

1515
| Operation | Latency | Target | Status |
1616
|---|---|---|---|
17-
| BM_Classify_Insert | 185 ns | <500ns | MET |
18-
| BM_Classify_Update | 191 ns | <500ns | MET |
17+
| BM_Classify_Insert | 189 ns | <500ns | MET |
18+
| BM_Classify_Update | 195 ns | <500ns | MET |
1919
| BM_Classify_Delete | 143 ns | <500ns | MET |
20-
| BM_Classify_Begin | 28.9 ns | <100ns | MET |
21-
| BM_Set_Simple | 114 ns | <300ns | MET |
22-
| BM_Set_Names | 112 ns | <300ns | MET |
23-
| BM_Set_MultiVar | 241 ns | <300ns | MET |
24-
| BM_Set_FunctionRHS | 178 ns | <300ns | MET |
25-
| BM_Select_Simple | 176 ns | <500ns | MET |
26-
| BM_Select_MultiColumn | 361 ns | <500ns | MET |
27-
| BM_Select_Join | 457 ns | <2us | MET |
28-
| BM_Select_Complex | 1048 ns | <2us | MET |
29-
| BM_Select_MultiJoin | 1010 ns | <2us | MET |
30-
| BM_Emit_SetSimple | 118 ns | <500ns | MET |
31-
| BM_Emit_SelectSimple | 232 ns | <500ns | MET |
32-
| BM_ArenaReset | 3.70 ns | <10ns | MET |
33-
| BM_PgSQL_Select_Simple | 182 ns |||
34-
| BM_PgSQL_Set_Simple | 94.1 ns |||
35-
| BM_MT_Set_Simple/threads:1 | 115 ns |||
36-
| BM_MT_Set_Simple/threads:2 | 111 ns |||
37-
| BM_MT_Set_Simple/threads:4 | 119 ns |||
38-
| BM_MT_Set_Simple/threads:8 | 121 ns |||
39-
| BM_MT_Select_Simple/threads:1 | 185 ns |||
40-
| BM_MT_Select_Simple/threads:2 | 186 ns |||
41-
| BM_MT_Select_Simple/threads:4 | 187 ns |||
42-
| BM_MT_Select_Simple/threads:8 | 200 ns |||
43-
| BM_MT_Select_Complex/threads:1 | 1023 ns |||
44-
| BM_MT_Select_Complex/threads:2 | 1076 ns |||
45-
| BM_MT_Select_Complex/threads:4 | 1068 ns |||
46-
| BM_MT_Select_Complex/threads:8 | 1135 ns |||
47-
| BM_MT_Classify_Begin/threads:1 | 30.5 ns |||
48-
| BM_MT_Classify_Begin/threads:2 | 30.2 ns |||
49-
| BM_MT_Classify_Begin/threads:4 | 30.1 ns |||
50-
| BM_MT_Classify_Begin/threads:8 | 31.4 ns |||
51-
| BM_Percentile_Set_Simple | 892 ns |||
52-
| BM_Percentile_Select_Simple | 971 ns |||
53-
| BM_Percentile_Select_Complex | 1686 ns |||
54-
| BM_Percentile_Classify_Begin | 822 ns |||
20+
| BM_Classify_Begin | 30.2 ns | <100ns | MET |
21+
| BM_Set_Simple | 107 ns | <300ns | MET |
22+
| BM_Set_Names | 105 ns | <300ns | MET |
23+
| BM_Set_MultiVar | 231 ns | <300ns | MET |
24+
| BM_Set_FunctionRHS | 168 ns | <300ns | MET |
25+
| BM_Select_Simple | 178 ns | <500ns | MET |
26+
| BM_Select_MultiColumn | 367 ns | <500ns | MET |
27+
| BM_Select_Join | 449 ns | <2us | MET |
28+
| BM_Select_Complex | 1035 ns | <2us | MET |
29+
| BM_Select_MultiJoin | 1038 ns | <2us | MET |
30+
| BM_Emit_SetSimple | 119 ns | <500ns | MET |
31+
| BM_Emit_SelectSimple | 256 ns | <500ns | MET |
32+
| BM_ArenaReset | 4.62 ns | <10ns | MET |
33+
| BM_PgSQL_Select_Simple | 194 ns |||
34+
| BM_PgSQL_Set_Simple | 92.7 ns |||
35+
| BM_MT_Set_Simple/threads:1 | 119 ns |||
36+
| BM_MT_Set_Simple/threads:2 | 116 ns |||
37+
| BM_MT_Set_Simple/threads:4 | 117 ns |||
38+
| BM_MT_Set_Simple/threads:8 | 123 ns |||
39+
| BM_MT_Select_Simple/threads:1 | 189 ns |||
40+
| BM_MT_Select_Simple/threads:2 | 188 ns |||
41+
| BM_MT_Select_Simple/threads:4 | 197 ns |||
42+
| BM_MT_Select_Simple/threads:8 | 202 ns |||
43+
| BM_MT_Select_Complex/threads:1 | 1181 ns |||
44+
| BM_MT_Select_Complex/threads:2 | 1130 ns |||
45+
| BM_MT_Select_Complex/threads:4 | 1410 ns |||
46+
| BM_MT_Select_Complex/threads:8 | 1216 ns |||
47+
| BM_MT_Classify_Begin/threads:1 | 28.9 ns |||
48+
| BM_MT_Classify_Begin/threads:2 | 30.3 ns |||
49+
| BM_MT_Classify_Begin/threads:4 | 30.5 ns |||
50+
| BM_MT_Classify_Begin/threads:8 | 32.5 ns |||
51+
| BM_Percentile_Set_Simple | 942 ns |||
52+
| BM_Percentile_Select_Simple | 1044 ns |||
53+
| BM_Percentile_Select_Complex | 1859 ns |||
54+
| BM_Percentile_Classify_Begin | 890 ns |||
55+
| BM_Expr_SimpleArith | 3.52 ns |||
56+
| BM_Expr_ComplexCompare | 13.5 ns |||
57+
| BM_PlanBuild_Simple | 277 ns |||
58+
| BM_PlanBuild_Complex | 1196 ns |||
59+
| BM_Pipeline_Simple | 9479 ns |||
60+
| BM_Op_Filter1000 | 53221 ns |||
61+
| BM_Op_Join1000 | 110134 ns |||
62+
| BM_Op_Sort1000 | 287953 ns |||
63+
| BM_Op_Aggregate1000 | 98400 ns |||
5564

5665
---
5766

5867
## Multi-Threaded Scaling (per-thread latency)
5968

6069
| Operation | 1 thread | 2 threads | 4 threads | 8 threads |
6170
|---|---|---|---|---|
62-
| BM_MT_Set_Simple | 115ns | 111ns | 119ns | 121ns |
63-
| BM_MT_Select_Simple | 185ns | 186ns | 187ns | 200ns |
64-
| BM_MT_Select_Complex | 1023ns | 1076ns | 1068ns | 1135ns |
65-
| BM_MT_Classify_Begin | 30.5ns | 30.2ns | 30.1ns | 31.4ns |
71+
| BM_MT_Set_Simple | 119ns | 116ns | 117ns | 123ns |
72+
| BM_MT_Select_Simple | 189ns | 188ns | 197ns | 202ns |
73+
| BM_MT_Select_Complex | 1181ns | 1130ns | 1410ns | 1216ns |
74+
| BM_MT_Classify_Begin | 28.9ns | 30.3ns | 30.5ns | 32.5ns |
6675

6776
---
6877

6978
## Percentile Latency
7079

7180
| Operation | avg | p50 | p95 | p99 | min | max |
7281
|---|---|---|---|---|---|---|
73-
| BM_Percentile_Set_Simple | 923.356ns | 902ns | 1.012kns | 1.252kns | 871ns | 47.558kns |
74-
| BM_Percentile_Select_Simple | 1.01098kns | 992ns | 1.092kns | 1.382kns | 941ns | 61.614kns |
75-
| BM_Percentile_Select_Complex | 1.75203kns | 1.713kns | 1.823kns | 2.635kns | 1.673kns | 217.482kns |
76-
| BM_Percentile_Classify_Begin | 848.873ns | 832ns | 891ns | 1.272kns | 791ns | 229.433kns |
82+
| BM_Percentile_Set_Simple | 971.958ns | 942ns | 1.192kns | 1.383kns | 891ns | 188.709kns |
83+
| BM_Percentile_Select_Simple | 1.08847kns | 1.012kns | 1.533kns | 1.824kns | 942ns | 45.023kns |
84+
| BM_Percentile_Select_Complex | 1.94169kns | 1.804kns | 2.845kns | 3.446kns | 1.693kns | 84.456kns |
85+
| BM_Percentile_Classify_Begin | 912.263ns | 852ns | 1.182kns | 1.403kns | 781ns | 247.707kns |
7786

7887
---
7988

8089
## Corpus Test Results
8190

8291
| Corpus | Dialect | Queries | OK | PARTIAL | ERROR |
8392
|---|---|---|---|---|---|
84-
| PostgreSQL regression | pgsql | 55553 | 55342 (99.6202%) | 204 | 7 |
93+
| PostgreSQL regression | pgsql | 55553 | 55508 (99.919%) | 38 | 7 |
8594
| MySQL MTR | mysql | 2270 | 2268 (99.9119%) | 2 | 0 |
86-
| CockroachDB | pgsql | 17429 | 16570 (95.0714%) | 859 | 0 |
87-
| SQLGlot | mysql | 1450 | 1424 (98.2069%) | 13 | 13 |
95+
| CockroachDB | pgsql | 17429 | 17422 (99.9598%) | 7 | 0 |
96+
| SQLGlot | mysql | 1450 | 1437 (99.1034%) | 0 | 13 |
8897
| sqlparser-rs MySQL | mysql | 424 | 424 (100%) | 0 | 0 |
89-
| sqlparser-rs PostgreSQL | pgsql | 471 | 468 (99.3631%) | 3 | 0 |
90-
| sqlparser-rs Common | mysql | 1536 | 1528 (99.4792%) | 8 | 0 |
91-
| Vitess | mysql | 2291 | 2286 (99.7818%) | 5 | 0 |
92-
| TiDB | mysql | 5043 | 5031 (99.762%) | 12 | 0 |
93-
| **TOTAL** | | **86467** | **85341** | **1106** | **20** |
98+
| sqlparser-rs PostgreSQL | pgsql | 471 | 471 (100%) | 0 | 0 |
99+
| sqlparser-rs Common | mysql | 1536 | 1536 (100%) | 0 | 0 |
100+
| Vitess | mysql | 2291 | 2291 (100%) | 0 | 0 |
101+
| TiDB | mysql | 5043 | 5037 (99.881%) | 6 | 0 |
102+
| **TOTAL** | | **86467** | **86394** | **53** | **20** |
94103

95104
---
96105

0 commit comments

Comments
 (0)