|
12 | 12 | build-ffi build-ffi-static generate-ffi-header build-ffi-example clean-ffi \ |
13 | 13 | develop-python test-python build-python typecheck-python \ |
14 | 14 | python-docs-build python-docs-preview python-docs-deploy \ |
15 | | - bench-compare bench-rust bench-rust-parsing-report bench-python bench-parse bench-parse-quick bench-parse-full bench-simple bench-simple-full \ |
| 15 | + bench-compare bench-rust bench-rust-parsing-report bench-python bench-parse bench-parse-quick bench-parse-full bench-simple bench-simple-full bench-transpile bench-transpile-quick \ |
16 | 16 | playground-dev playground-build playground-preview playground-deploy \ |
17 | 17 | fmt \ |
18 | 18 | bump-version |
|
81 | 81 | @echo " make bench-parse-full - Parse benchmark (all available parsers)" |
82 | 82 | @echo " make bench-simple - Simple parse benchmark (core-only, median-of-5)" |
83 | 83 | @echo " make bench-simple-full - Simple parse benchmark (all available parsers)" |
| 84 | + @echo " make bench-transpile - Transpile benchmark (polyglot vs sqlglot)" |
| 85 | + @echo " make bench-transpile-quick - Transpile benchmark fast mode" |
84 | 86 | @echo "" |
85 | 87 | @echo "Build:" |
86 | 88 | @echo " make generate-bindings - Generate TypeScript bindings (ts-rs) and copy to SDK" |
@@ -344,15 +346,29 @@ bench-parse-full: |
344 | 346 | @uv sync --project tools/bench-compare --reinstall-package polyglot-sql && \ |
345 | 347 | uv run --project tools/bench-compare python3 tools/bench-compare/bench_parse.py --quiet |
346 | 348 |
|
| 349 | +# Simple parse benchmark (core), w/o rebuilding the Python environment: polyglot-sql vs sqlglot, median-of-5 |
| 350 | +bench-simple-quick: |
| 351 | + @uv run --project tools/bench-compare python3 tools/bench-compare/bench_simple.py --core-only |
| 352 | + |
347 | 353 | # Simple parse benchmark (core): polyglot-sql vs sqlglot, median-of-5 |
348 | 354 | bench-simple: |
349 | 355 | @uv sync --project tools/bench-compare --reinstall-package polyglot-sql && \ |
350 | | - uv run --python 3.13 --project tools/bench-compare python3 tools/bench-compare/bench_simple.py --core-only |
| 356 | + uv run --project tools/bench-compare python3 tools/bench-compare/bench_simple.py --core-only |
351 | 357 |
|
352 | 358 | # Simple parse benchmark (full): include optional third-party parsers |
353 | 359 | bench-simple-full: |
354 | 360 | @uv sync --project tools/bench-compare --reinstall-package polyglot-sql && \ |
355 | | - uv run --python 3.13 --project tools/bench-compare python3 tools/bench-compare/bench_simple.py |
| 361 | + uv run --project tools/bench-compare python3 tools/bench-compare/bench_simple.py |
| 362 | + |
| 363 | +# Transpile benchmark: polyglot-sql (Rust/PyO3) vs sqlglot (C tokenizer) via pyperf |
| 364 | +bench-transpile: |
| 365 | + @uv sync --project tools/bench-compare --reinstall-package polyglot-sql && \ |
| 366 | + uv run --project tools/bench-compare python3 tools/bench-compare/bench_transpile.py --quiet |
| 367 | + |
| 368 | +# Transpile benchmark (quick): faster but less stable timings |
| 369 | +bench-transpile-quick: |
| 370 | + @uv sync --project tools/bench-compare --reinstall-package polyglot-sql && \ |
| 371 | + uv run --project tools/bench-compare python3 tools/bench-compare/bench_transpile.py --quiet --quick |
356 | 372 |
|
357 | 373 | # ============================================================================= |
358 | 374 | # Build |
|
0 commit comments