|
| 1 | +# Marshal Perf Raw Data |
| 2 | + |
| 3 | +Raw JSON artifacts backing `Misc/marshal-perf-diary.md`. Everything here |
| 4 | +is regeneratable — kept checked in so reviewers can inspect numbers |
| 5 | +without rerunning the full methodology. |
| 6 | + |
| 7 | +## Marshal microbench (`marshal_bench_cpu_stable.py`) |
| 8 | + |
| 9 | +Three pinned runs per commit, 11 repeats per operation, 200k `loads` × |
| 10 | +100k `dumps`. Pinning: `taskset -c 0`. |
| 11 | + |
| 12 | +| File | Commit / idea | |
| 13 | +| --- | --- | |
| 14 | +| `exp0-run{1..3}.json` | `perf-baseline` self-check at `eb1c4b7` | |
| 15 | +| `exp1-run{1..3}.json` | Experiment 1 (raw `PyObject **` refs array) | |
| 16 | +| `exp2-run{1..3}.json` | Experiment 2 (tagged pointer state, stacked on 1) | |
| 17 | +| `exp3-run{1..3}.json` | Experiment 3 (collapse reserve+publish) | |
| 18 | +| `exp4-run{1..3}.json` | Experiment 4 (`has_incomplete` counter) | |
| 19 | +| `exp5-run{1..3}.json` | Experiment 5 (zero-init + drop mark_ready) | |
| 20 | +| `exp6-run{1..3}.json` | Experiment 6 (drop `allow_incomplete_hashable` param) | |
| 21 | +| `exp7-run{1..3}.json` | Experiment 7 (force-inline helpers) | |
| 22 | +| `exp8-run{1..3}.json` | Experiment 8 (`frozendict`-then-wrap when `flag==0`) | |
| 23 | +| `exp9-run{1..3}.json` | Experiment 9 (preallocate refs capacity) | |
| 24 | +| `expC-run{1..3}.json` | Combined (Exp 1+2+6+7) on `exp/combined-winners` | |
| 25 | +| `final-head-run{1..3}.json` | Post-squash HEAD `4aaf064344d` (same as Combined) | |
| 26 | + |
| 27 | +Schema per bench (small_tuple / nested_dict / code_obj): |
| 28 | + |
| 29 | + loads_number, dumps_number # inner loop counts |
| 30 | + loads_runs: [11 times] # raw timings |
| 31 | + dumps_runs: [11 times] |
| 32 | + loads_min, loads_median # statistics |
| 33 | + dumps_min, dumps_median |
| 34 | + |
| 35 | +## pyperformance slice |
| 36 | + |
| 37 | +Ten marshal-adjacent benchmarks (pickle × 4, unpickle × 3, |
| 38 | +python_startup × 2, unpack_sequence). Run with `uvx pyperformance run |
| 39 | +-b <list> --affinity 0` via `taskset -c 0`. |
| 40 | + |
| 41 | +| File | Python | |
| 42 | +| --- | --- | |
| 43 | +| `pyperf-slice-baseline.json` | `main` tip `2faceeec` built at `/tmp/cpython-baseline/python` | |
| 44 | +| `pyperf-slice-current.json` | HEAD `4aaf064344d` built in-tree | |
| 45 | + |
| 46 | +These are standard `pyperf` format; compare with: |
| 47 | + |
| 48 | + uvx pyperformance compare pyperf-slice-baseline.json pyperf-slice-current.json |
| 49 | + |
| 50 | +## Regeneration |
| 51 | + |
| 52 | +See `Misc/marshal-perf-diary.md` → "Ground rules" for the exact harness |
| 53 | +(`/tmp/marshal_bench_cpu_stable.py` inline script) and methodology. |
0 commit comments