fork of gitlab.com/devnw/zig/json for zig 0.17
README.md

Expanded schema dependency performance gate #

Candidate 72eaa24403faea7d83c32957e86620cdc6dd145f contains production changes through d5c06bd41059feba0ee96c9b43e6949ffdd97342. Baseline is 375fce4; its only source additions are regression tests, which are not part of the executable. Both binaries were rebuilt from the same eleven-family probe with Zig 0.17 ReleaseFast. Temporary build-file changes were restored; candidate worktree is clean.

All 308 measured executions passed both valid-instance acceptance and invalid-instance rejection checks. Each family and cold/warm mode has seven adjacent baseline/candidate pairs; pair order alternates each round. Iterations are 10,000 per execution, except the large nested fixture at 1,000. Every iteration creates and destroys a page-backed arena, matching production's underlying allocator. Cold mode includes schema compilation; warm mode reuses the compiled schema. Both modes parse and validate valid and invalid instances. Shared schema parsing/setup is outside timing.

Median elapsed ratios range from 0.9688 to 1.0124. The largest median slowdown is 1.24%; individual pairs vary from 0.7893 to 1.2306. These fixtures show no material repeatable default-path slowdown. They are dependency microbenchmarks, not server throughput evidence, and do not time injected allocation failures or measure allocation counts.

Family Cold candidate/baseline median Warm candidate/baseline median
object 1.0092 1.0046
pattern 0.9977 1.0023
pattern_properties 1.0114 1.0109
anchor 0.9950 0.9921
relative_id 1.0124 0.9931
nested 1.0107 1.0049
contains 0.9834 0.9826
any_of 0.9816 0.9936
one_of 0.9951 0.9965
not 0.9688 0.9862
conditional 0.9837 1.0088

Raw data: dependency-perf.jsonl; complete ratios: dependency-perf-summary.json; exact source, fixture, probe and binary hashes: dependency-perf-metadata.json; stdout capture: dependency-expanded-perf.log. Build logs are dependency-probe-expanded-build-{baseline,candidate}.log. Previous six-family measurements remain archived in 58300e9-performance/ and are not substituted for this final candidate.

Native behavior agrees with the actual Python jsonschema 4.26.0 valid/invalid results in dependency-python-expanded.json, whose fixture hash matches this batch. Python has no direct analogue to the Zig allocator fault injection; the error-path proof is the separate original-source negative controls and corrected full suite.

Build handles 20364 and 60322 completed exit 0; measurement handle 35306 completed exit 0. No builds or measured work from the other task agents ran in the reserved slot. Shared-host scheduling and unrelated machine activity remain possible noise sources. CPU ownership was explicitly released to the worker agent after terminal completion.

Correctness evidence #

The full pinned suite passed 639 of 640 tests, with one existing opt-in parse benchmark skip. The official JSON Schema suite was pinned to fe8c2f0de2041943975932b6bf4bd882625b6cfb. Eight original-source regression controls fail: regex compilation, anchor resolution, relative identifier resolution, and contains/anyOf/oneOf/not/if validation. The same tests pass in the full candidate suite. Raw logs are included here.

The Python oracle uses jsonschema 4.26.0 and the exact shared fixture SHA in its output. No Python allocation-fault equivalence is claimed. Local paths in metadata/scripts identify the original measured environment; adapt the evidence directory and checkout paths before rerunning. Linux CI remains pending at publication.