What it takes to count the Linux kernel's 36M lines of code in under 70ms
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
mezura, a Rust line counter, cut its run on the 36M-line Linux v6.15 kernel tree from about 0.4 s to 67 ms, per the author's account. The post attributes the gains to byte ranges instead of copies, one SIMD pass per 64-byte block, mmap for large files, and per-CPU compilation…