You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/benchmarks/REPRODUCING.md
+4-22Lines changed: 4 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,8 @@ ls -la third_party/libpg_query/libpg_query.a
72
72
73
73
**What libpg_query is:** This is PostgreSQL's actual parser (Bison-generated), extracted from the PostgreSQL source code by pganalyze. It compiles PostgreSQL's parser, lexer, memory management, and node types into a standalone library. The `pg_query_parse()` function takes a SQL string and returns a JSON-serialized parse tree. The `pg_query_raw_parse()` function (internal API) returns the raw AST without JSON serialization.
74
74
75
+
**Optimization flags:** libpg_query builds with `-O3 -g` by default (see its Makefile: `CFLAGS_OPT_LEVEL = -O3`). The `-g` flag adds debug symbols but does not affect runtime performance. Both ParserSQL and libpg_query are compiled at `-O3` — this is a fair comparison.
76
+
75
77
---
76
78
77
79
## Step 4: Build the comparison benchmark
@@ -153,27 +155,7 @@ xdg-open bench/sqlparser_rs_bench/target/criterion/report/index.html # Linux
ReadySet uses `nom-sql`, a nom-based SQL parser. However, ReadySet is transitioning to sqlparser-rs as their primary parser (default: `both-prefer-sqlparser`). Benchmarking nom-sql separately has limited value since it's being phased out.
159
-
160
-
If you still want to run it:
161
-
162
-
```bash
163
-
# Clone ReadySet (full repo required for workspace dependencies, ~1.3GB)
0 commit comments