aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/044-specs/2026-10-19-inflate.jsonl
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 02:28:34 +0100
committereunhhu <[email protected]>2026-10-19 02:28:34 +0100
commitca214af2684b3c6e6982d1fe8be4e7ecc0849b00 (patch)
tree9710ca0c2e1671ea03ae17980632bcd5fbf03f6f /research/experiments/044-specs/2026-10-19-inflate.jsonl
parentf12346827a136536c5e8e9c6af3da842bd5cc0c3 (diff)
downloadpure-ca214af2684b3c6e6982d1fe8be4e7ecc0849b00.tar.gz
pure-ca214af2684b3c6e6982d1fe8be4e7ecc0849b00.zip
140's 3, inflate (RFC 1951), written in aup with no new opcode (aup's examples/inflate.aup, codes read a bit at a time from canonical counts as zlib's puff.c): 640 streams zlib made (6,488,480 bytes: random bytes, words, runs and repeats 32,768 back; levels 0, 1, 6, 9 and zlib's five strategies, so stored, fixed and dynamic blocks) inflated to the original's bytes on the three paths, the paths' outputs the same bytes; 240 damaged streams (cut, a bit flipped) read as inflate.py (the Python reference) reads them, 165 refused by both and 75 the same bytes; module_specs in make check: 144 streams on the three paths, 21 cut ones failing and leaving the last bytes; bars: written (no new opcode), three workarounds (lists passed in records: a fn takes no list; the output a list of one: a bytes value is no state; a block's tables built in a fn: a let's list lives in the handler's own block), 132 lines against Python's 81, 1,152 ns an output byte against the same algorithm in C 10.7 (108x) and zlib 3.5 (329x), pure Python 1,214; 191 instructions a byte (a block fn called for each bit was 246 and 1,553 ns: small block fns' inlining is 2c's leftover); the four timing tools' message calls fixed for 4b's API (no keys); CHECKPOINT's direction row
Diffstat (limited to 'research/experiments/044-specs/2026-10-19-inflate.jsonl')
-rw-r--r--research/experiments/044-specs/2026-10-19-inflate.jsonl5
1 files changed, 5 insertions, 0 deletions
diff --git a/research/experiments/044-specs/2026-10-19-inflate.jsonl b/research/experiments/044-specs/2026-10-19-inflate.jsonl
new file mode 100644
index 0000000..9c85c06
--- /dev/null
+++ b/research/experiments/044-specs/2026-10-19-inflate.jsonl
@@ -0,0 +1,5 @@
+{"streams": 640, "bytes": 6488480, "right": {"batches": 640, "rounds": 640, "all": 640}, "paths_same": true, "damaged": 240, "damaged_refused": 165, "damaged_agreed": 240, "aup_lines": 132, "aup_brace_lines": 18, "python_lines": 81}
+{"size":65536,"stream":22991,"jit":"0","batch":"","c_ns_per_byte":10.657,"zlib_ns_per_byte":3.500,"pure_ns_per_byte":1152.379,"to_c":108.1,"to_zlib":329.3,"instructions":12527836,"instructions_per_byte":191.2}
+{"size":65536,"stream":22991,"jit":"0","batch":"0","c_ns_per_byte":10.651,"zlib_ns_per_byte":3.491,"pure_ns_per_byte":1153.844,"to_c":108.3,"to_zlib":330.6,"instructions":12527836,"instructions_per_byte":191.2}
+{"size":65536,"stream":22991,"jit":"all","batch":"","c_ns_per_byte":10.646,"zlib_ns_per_byte":3.503,"pure_ns_per_byte":1151.154,"to_c":108.1,"to_zlib":328.7,"instructions":12527836,"instructions_per_byte":191.2}
+{"size":65536,"packed":22991,"python_ns_per_byte":1213.5}