From 95568ae83a73ace578e3972a01aef55c889e58a2 Mon Sep 17 00:00:00 2001 From: Hiroki KUMAZAKI Date: Sat, 17 Oct 2026 02:25:49 +0900 Subject: [PATCH] Tooling: 1.27x faster t16 invoice-boundary replay via compresslevel=1 The registered replay wrote every mutated .gz fixture at zlib's default level 9; zlib.compress alone was 24.7 s of the 96.1 s cProfile total. compresslevel=1 leaves the decompressed payloads unchanged, so the full deterministic receipt is byte-identical: CPython 3.12.13 direct run 107.41 s -> 84.40 s with identical stdout, and 3.14.4 67.72 s -> 43.90 s. No mathematical, source or receipt change. --- research/t16-invoice-boundary-audit/verify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/research/t16-invoice-boundary-audit/verify.py b/research/t16-invoice-boundary-audit/verify.py index 3682fa0ddd..5669c919f7 100644 --- a/research/t16-invoice-boundary-audit/verify.py +++ b/research/t16-invoice-boundary-audit/verify.py @@ -52,7 +52,7 @@ def read(path): def write(path, value): data = (json.dumps(value, indent=2) + '\n').encode('utf-8') - path.write_bytes(gzip.compress(data, mtime=0) if path.suffix == '.gz' else data) + path.write_bytes(gzip.compress(data, mtime=0, compresslevel=1) if path.suffix == '.gz' else data) def normalized(value):