Hasty Briefsbeta

Bilingual

I/O is no longer the bottleneck? (2022)

4 months ago
  • #I/O
  • #vectorization
  • #performance
  • Ben Hoyt's blog post challenges the belief that I/O is the bottleneck in programming interview problems like counting word frequencies.
  • Sequential read speeds have significantly improved, reaching 1.6 GB/s on cold cache and 12.8 GB/s on warm cache.
  • An optimized C implementation for word frequency counting only achieved 278 MB/s, far below the expected speed.
  • Vectorization attempts improved performance to 330 MB/s, but still lagged behind sequential read speeds.
  • The standard 'wc -w' tool performed poorly at 245.2 MB/s due to additional processing for different whitespace characters.
  • Hand-optimized AVX2 vectorized word count achieved 1.45 GB/s, about 11% of the sequential disk read speed.
  • The conclusion supports that disk speed has caught up, making I/O less of a bottleneck compared to CPU processing.