aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/040-against-c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-18 16:44:17 +0100
committereunhhu <[email protected]>2026-10-18 16:44:17 +0100
commit241016b0fc3139414089619f0ef8cb7237722c6c (patch)
treeb782ed50757ee910278c8d1129dcfc7ded48d527 /research/experiments/040-against-c
parent433f56c29b26b83cd2991b4a834b427fae3e75d4 (diff)
downloadpure-241016b0fc3139414089619f0ef8cb7237722c6c.tar.gz
pure-241016b0fc3139414089619f0ef8cb7237722c6c.zip
Research 140, 027's stage 2c measured: JSON read into a tree by recursive descent (aup's examples/json_tree.aup: value(d, i) -> Json, number giving the value and where it ends, each call's own let's lists, string's escapes joined by char(u), a depth-first walk passing items as values) against Python's reading walked so: JSONTestSuite's 95 y_ taken alike, no n_ taken, 2b's 6 i_ taken (a lone surrogate refused by char as encoding); 100,000 and 50,000 deep refused as memory (the frames fill the event's room, 0.2 s), 30,000 deep taken (past Python's json); 300 random documents alike; in make check (module_specs' digest now depth first, three paths); 142 lines against the same design's 105 in Python (json_rec.py; the bar missed: 24 lines of declarations, 23 of braces), 46 times cJSON's time and 1.6 times plain Python's (600 ns a byte, 248 Pure instructions; 71% in the steps, about 10% in calls, 66,000 calls a document, most of them small block fns like skip); characters against Python's ord in aup's check; probes: p5-chars compiles, p4-rec (a view calling itself) refused; instruction counts: the workloads' modules the same, batches within 0.001% of 2b (BFS -0.21%), the executor alone -0.001% to +0.30%, the bank's queries -0.30% to +0.11% (four runs each; bar 1%); json_rec_time.c (cJSON, a depth-first digest compared first); CHECKPOINT's direction row through 2c
Diffstat (limited to 'research/experiments/040-against-c')
-rw-r--r--research/experiments/040-against-c/2026-10-18-counts-s27.jsonl4
-rw-r--r--research/experiments/040-against-c/2026-10-18-counts-s27b.jsonl4
2 files changed, 8 insertions, 0 deletions
diff --git a/research/experiments/040-against-c/2026-10-18-counts-s27.jsonl b/research/experiments/040-against-c/2026-10-18-counts-s27.jsonl
new file mode 100644
index 0000000..6189828
--- /dev/null
+++ b/research/experiments/040-against-c/2026-10-18-counts-s27.jsonl
@@ -0,0 +1,4 @@
+{"serve": "pure-serve", "per_branch": {"instructions": 27104679, "cycles": 11890487}, "in_credit": {"instructions": 3517992, "cycles": 1599796}, "large": {"instructions": 1421141, "cycles": 635549}, "ranks": {"instructions": 24461843, "cycles": 14883419}, "none": {"instructions": 617594, "cycles": 206190}, "field": {"instructions": 8999054, "cycles": 3366751}, "found": {"instructions": 14151357, "cycles": 10583883}}
+{"serve": "pure-serve", "per_branch": {"instructions": 27000469, "cycles": 11861597}, "in_credit": {"instructions": 3494299, "cycles": 1586220}, "large": {"instructions": 1421606, "cycles": 612299}, "ranks": {"instructions": 24408016, "cycles": 14881533}, "none": {"instructions": 617123, "cycles": 194839}, "field": {"instructions": 9008753, "cycles": 3313430}, "found": {"instructions": 14162216, "cycles": 10579828}}
+{"serve": "pure-serve", "per_branch": {"instructions": 27179606, "cycles": 11895677}, "in_credit": {"instructions": 3534978, "cycles": 1593510}, "large": {"instructions": 1421029, "cycles": 615442}, "ranks": {"instructions": 24504036, "cycles": 14990092}, "none": {"instructions": 617586, "cycles": 195867}, "field": {"instructions": 8999045, "cycles": 3337164}, "found": {"instructions": 14147990, "cycles": 10807080}}
+{"serve": "pure-serve", "per_branch": {"instructions": 27087988, "cycles": 11880543}, "in_credit": {"instructions": 3514114, "cycles": 1652760}, "large": {"instructions": 1421534, "cycles": 679535}, "ranks": {"instructions": 24458239, "cycles": 15232390}, "none": {"instructions": 617115, "cycles": 194019}, "field": {"instructions": 9008642, "cycles": 3371309}, "found": {"instructions": 14160887, "cycles": 10559598}}
diff --git a/research/experiments/040-against-c/2026-10-18-counts-s27b.jsonl b/research/experiments/040-against-c/2026-10-18-counts-s27b.jsonl
new file mode 100644
index 0000000..d230430
--- /dev/null
+++ b/research/experiments/040-against-c/2026-10-18-counts-s27b.jsonl
@@ -0,0 +1,4 @@
+{"serve": "pure-serve", "per_branch": {"instructions": 26965513, "cycles": 12329820}, "in_credit": {"instructions": 3486678, "cycles": 2301853}, "large": {"instructions": 1421213, "cycles": 764526}, "ranks": {"instructions": 24384330, "cycles": 14965408}, "none": {"instructions": 617594, "cycles": 198786}, "field": {"instructions": 8999053, "cycles": 3340870}, "found": {"instructions": 14153477, "cycles": 10932153}}
+{"serve": "pure-serve", "per_branch": {"instructions": 27165700, "cycles": 11943061}, "in_credit": {"instructions": 3531402, "cycles": 1625620}, "large": {"instructions": 1421494, "cycles": 606837}, "ranks": {"instructions": 24499209, "cycles": 14876346}, "none": {"instructions": 617115, "cycles": 193396}, "field": {"instructions": 9008642, "cycles": 3349618}, "found": {"instructions": 14160543, "cycles": 10702223}}
+{"serve": "pure-serve", "per_branch": {"instructions": 27199887, "cycles": 12121684}, "in_credit": {"instructions": 3539333, "cycles": 1628967}, "large": {"instructions": 1421149, "cycles": 608625}, "ranks": {"instructions": 24513416, "cycles": 15034269}, "none": {"instructions": 617594, "cycles": 195387}, "field": {"instructions": 8999053, "cycles": 3333569}, "found": {"instructions": 14151773, "cycles": 10702538}}
+{"serve": "pure-serve", "per_branch": {"instructions": 27106101, "cycles": 11890926}, "in_credit": {"instructions": 3518026, "cycles": 1605106}, "large": {"instructions": 1421542, "cycles": 619029}, "ranks": {"instructions": 24466175, "cycles": 14887083}, "none": {"instructions": 617115, "cycles": 192958}, "field": {"instructions": 9008642, "cycles": 3345733}, "found": {"instructions": 14162615, "cycles": 10752104}}