rad experiment show 7c26ea66a7721d9a640d79f88ef569e43f7b8697
by ee@did:key:z6MkvsiybCuk1WDZhh2aXDx7NTiZejKgWZygMNsUuXDMNvVQ · Apr 24 19:27 2026
read_to_end into thread-local scratch
Measurements
Metric
BaselineThe benchmark measurement of the unmodified code
CandidateThe code with the proposed optimization applied
Candidate/Parent ΔThe performance change from baseline to candidate
duration (ms)primary
wall-clock time to compute the content-id of a 64 MiB directory corpus (64 files x 1 MiB each, deterministic PRNG), walking and BLAKE3-hashing every file and then hashing the iroh Collection root; lower is better
8.080 ms (n=1)
8.608 ms (n=1)
+6.53%REGRESSED
Annotations
hypothesis
read into a thread-local scratch buffer is faster than mmap for warm 1 MiB files
next_action_hint
stop messing with the per-file I/O mechanism; look at Collection::from_iter+to_blobs and whether the final blake3 hash over the HashSeq blob can be composed from already-computed blob hashes without reserializing
rollback_reason
+6% regression — mmap wins because update_mmap feeds blake3 in aligned streaming chunks while a single bulk update on a 1 MiB slice does not parallelise or cache well
Base CommitThe starting commit before the optimization was applied