Artifact 855d5629141f7472426f1e3d09137fa869cfb0a0f2ff004dcc1ce297cb71af32:
- File
src/logstore.zig
-
2026-08-25 18:30:47
— part of check-in
[4829f043b1]
on branch fix-148-prefix-lookup
— logstore: answer a byte-aligned name prefix from the sorted directory
A complete SHA-1 name is shorter than max_hash_len, so it missed the full-width fast path and fell to the O(store) hex scan -- once per file under `ls --size` and `ls --long`. On tcl's tip the 545 SHA-1 named files cost ~54ms each against ~0.2ms for the 1,653 SHA3 ones.
The directory is ordered by raw digest, so a prefix's matches form one contiguous run. A binary search for the run plus a walk of it proves uniqueness rather than assuming it, which is what the SHA-1 case was surrendered to the scan for. Odd-length prefixes end mid-byte and keep the scan.
ls --size on tcl: 1.98s -> 0.03s. Issue #148. (user: dmestas, size: 369638) [annotate] [blame] [check-ins using]
- 2026-08-25 18:50:27 — part of check-in [3f8aa36a1d] on branch trunk — merge fix-148-prefix-lookup: byte-aligned name lookup (#148) (user: dmestas, size: 369638) [annotate] [blame] [check-ins using]
-
2026-08-25 18:30:47
— part of check-in
[4829f043b1]
on branch fix-148-prefix-lookup
— logstore: answer a byte-aligned name prefix from the sorted directory