perf(p6): add a reproducible baseline profile harness
- tools/perf/bench.py builds the release CLI and measures 7 .mq.md workloads three times with wall time and peak RSS, validating --json success. - Check in the schema-tagged JSON report and interpretation; no bytecode/JIT/ native backend was added, so P6 remains baseline-only, not complete. - Update STATUS/changelog/tests README. Gate: fmt, clippy -D warnings, 430 tests passed.
This commit is contained in:
1 parent
b020904199
commit
4c8e7fd8ab
6 files changed
+219
-1
No files matched your search
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"schema": "marqdo.perf-baseline",
|
||||
"schema_version": 1,
|
||||
"binary": ".cache/target/release/marqdo",
|
||||
"iterations": 3,
|
||||
"workloads": [
|
||||
{
|
||||
"name": "allocator-free-list",
|
||||
"source": "tests/conformance/semantics/55-first-fit-free-list-allocator.mq.md",
|
||||
"seconds_median": 0.0173,
|
||||
"seconds_min": 0.017026568995788693,
|
||||
"max_rss_kb_median": 8428
|
||||
},
|
||||
{
|
||||
"name": "json-parser",
|
||||
"source": "tests/conformance/semantics/62-json-array-parser.mq.md",
|
||||
"seconds_median": 0.0188,
|
||||
"seconds_min": 0.01880078506655991,
|
||||
"max_rss_kb_median": 8960
|
||||
},
|
||||
{
|
||||
"name": "table-sort",
|
||||
"source": "tests/conformance/semantics/65-table-sort-stdlib.mq.md",
|
||||
"seconds_median": 0.0152,
|
||||
"seconds_min": 0.014747997978702188,
|
||||
"max_rss_kb_median": 7476
|
||||
},
|
||||
{
|
||||
"name": "bytecode-vm",
|
||||
"source": "tests/conformance/semantics/63-memory-bytecode-vm.mq.md",
|
||||
"seconds_median": 0.0155,
|
||||
"seconds_min": 0.015298803802579641,
|
||||
"max_rss_kb_median": 7692
|
||||
},
|
||||
{
|
||||
"name": "matrix-multiply",
|
||||
"source": "tests/conformance/semantics/70-matrix-multiply.mq.md",
|
||||
"seconds_median": 0.0151,
|
||||
"seconds_min": 0.014752828981727362,
|
||||
"max_rss_kb_median": 7368
|
||||
},
|
||||
{
|
||||
"name": "http-parser",
|
||||
"source": "tests/conformance/semantics/71-http-parser.mq.md",
|
||||
"seconds_median": 0.018,
|
||||
"seconds_min": 0.017968795029446483,
|
||||
"max_rss_kb_median": 8196
|
||||
},
|
||||
{
|
||||
"name": "stdlib-print-demo",
|
||||
"source": "stdlib/demo.mq.md",
|
||||
"seconds_median": 0.0205,
|
||||
"seconds_min": 0.02037098305299878,
|
||||
"max_rss_kb_median": 9636
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
# RFC-CM P6 baseline profile
|
||||
|
||||
Date: 2026-11-20 (Asia/Shanghai)
|
||||
Repository: `marqdo-cli`
|
||||
Baseline: `b020904` plus this step's changes.
|
||||
Scope: **baseline measurement only**; no bytecode/JIT/native backend was added.
|
||||
|
||||
## Harness
|
||||
|
||||
`tools/perf/bench.py` builds `marqdo-cli --release`, runs each workload three
|
||||
times through `/usr/bin/time -f "%e %M"`, measures wall time with
|
||||
`time.perf_counter`, verifies `--json` success and writes a schema-tagged JSON
|
||||
report. The checked-in report is
|
||||
[`2026-11-20-p6-profile.json`](2026-11-20-p6-profile.json).
|
||||
|
||||
Environment: Ubuntu 26.04 container, Linux x86_64, Rust 1.100.0, release
|
||||
profile, 7 selected `.mq.md` workloads. These are small conformance workloads,
|
||||
so most times are dominated by process/startup and Markdown parsing; they are
|
||||
not throughput benchmarks of large scientific problems.
|
||||
|
||||
## Results (median of 3)
|
||||
|
||||
| Workload | Wall s | Peak RSS KiB |
|
||||
|---|---:|---:|
|
||||
| allocator-free-list | 0.0173 | 8428 |
|
||||
| json-parser | 0.0188 | 8960 |
|
||||
| table-sort | 0.0152 | 7476 |
|
||||
| bytecode-vm | 0.0155 | 7692 |
|
||||
| matrix-multiply | 0.0151 | 7368 |
|
||||
| http-parser | 0.0180 | 8196 |
|
||||
| stdlib-print-demo | 0.0205 | 9636 |
|
||||
|
||||
## Interpretation
|
||||
|
||||
* Startup + parse + load dominate these small workloads; the interpreter's
|
||||
per-byte/per-call cost is visible mainly in the VM/matrix/table loops.
|
||||
* `stdlib-print-demo` is highest RSS/wall because it loads the bundled stdlib
|
||||
modules and formats all value types through `.mq.md`.
|
||||
* The current release binary is a tree-walking Rust interpreter; no bytecode
|
||||
compiler, JIT, columnar numeric backend or copy-elision pass exists.
|
||||
* No claim of P6 pass: the RFC requires an optimized implementation that is
|
||||
equivalent to the reference interpreter and reproducible performance/budget
|
||||
evidence. This report only establishes the baseline and a reproducible
|
||||
harness for future work.
|
||||
|
||||
## Reproduce
|
||||
|
||||
```bash
|
||||
export PATH=/root/.cargo/bin:$PATH
|
||||
export CARGO_HOME=/root/work/marqdo-cli/.cache/cargo
|
||||
export CARGO_TARGET_DIR=/root/work/marqdo-cli/.cache/target
|
||||
python3 tools/perf/bench.py > /tmp/marqdo-perf.json
|
||||
```
|
||||
Reference in new issue
Block a user