Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/parse-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ jobs:
git -C /tmp/antlr-cleanroom/grammars-v4 fetch --depth 1 origin 284602b3f23ca54dc30778204ab7ae9e969145e9
git -C /tmp/antlr-cleanroom/grammars-v4 checkout FETCH_HEAD

- name: Rust/Go AST parity (kotlin + java + trino)
run: |
python head/tools/parse-bench/run.py \
--languages kotlin,java,trino \
--runtimes rust-antlr,go-antlr \
--ast-check \
--quick \
--work-dir head/target/parse-bench-ast

- name: Run base benchmark
if: github.event_name == 'pull_request'
run: |
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,18 @@ python3 tools/parse-bench/run.py \
--markdown target/parse-bench/results.md
```

Add `--ast-check` to require byte-identical Rust/Go parse trees (no error nodes)
before timing. Prefer that gate for fair comparisons; some C# Mono fixtures still
diverge today (see `tools/parse-bench/README.md`). For a clean smoke:

```bash
python3 tools/parse-bench/run.py \
--languages kotlin,trino \
--runtimes rust-antlr,go-antlr \
--ast-check \
--quick
```

The report prints `min`/`avg` parse time and a ratio against `rust-antlr` for
every fixture. Use `--quick` for a 3-iteration/1-warmup smoke run, or adjust
`--iters`/`--warmups` for longer, lower-variance runs; add
Expand Down
Loading
Loading