From e0276bfa9fd4bb418d0f82e12f09069629185863 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Tue, 13 Oct 2026 06:16:12 +0100 Subject: Research 140, 027's stage 2a measured: whether bytes are JSON (aup's examples/json.aup, 80 lines against the same design's 90 in Python): JSONTestSuite's 95 y_ cases taken and 188 n_ refused, 21 of the 35 i_ taken, the three paths alike, in make check (module_specs, the 316 small cases in tests/specs/json under their MIT license, the two large ones made and hashed); 116 times C's time and 1.2 times plain Python's (299 ns a byte, 339 instructions); && and || made to decide alone (writing it, i < n && d[i] read past the end) with AND and OR kept where the right side cannot fail, every other module byte for byte the same; SHA-256 again with formats and joined bytes, 42 lines and 159 times C --- tests/specs/json/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/specs/json/README.md (limited to 'tests/specs/json/README.md') diff --git a/tests/specs/json/README.md b/tests/specs/json/README.md new file mode 100644 index 0000000..1000c84 --- /dev/null +++ b/tests/specs/json/README.md @@ -0,0 +1,9 @@ +# JSONTestSuite's parsing cases + +From [nst/JSONTestSuite](https://github.com/nst/JSONTestSuite) at 1ef36fa, `test_parsing/`: `y_` files are JSON texts, +`n_` files are not, and on `i_` files a parser may go either way (MIT license, `LICENSE`). `tests/check.py`'s +`module_specs` runs aup's `examples/json.aup` on each of them, on Pure's three paths. + +Two `n_` files are left out for their size and made by the check: `n_structure_100000_opening_arrays.json` is `[` +100,000 times (SHA-256 13f86ea1e7edd116...), and `n_structure_open_array_object.json` is `[{"":` 50,000 times and a +newline (48b232fcd18ce2f7...). -- cgit v1.2.3