Building a 2x faster ARM64 assembly lexer for Dart revealed that I/O, not lexing speed, was the bottleneck. Processing 104K files took 14.5 seconds for I/O versus 2.8 seconds for lexing due to syscall overhead from 300K+ open/read/close operations. Archiving files into tar.gz reduced I/O time by 43x (14.5s to 339ms) and total

11m read time From modulovalue.com
Post cover image
Table of contents
The setup #The first surprise: lexing is fast #The second surprise: the SSD is not the bottleneck #The hypothesis #The results #Breaking down the numbers #Why pub.dev uses tar.gz #The broader lesson #What I would do differently #Conclusion #Addendum: Reader Suggestions #

Sort: