3 ms·
TLDR: author wrote a program in C that sums all bytes mod 256 of 1GB file into one byte. It runs 2.5 sec first time when it reads file from SSD and just 0.6 se
by coolspot 9y ago
TLDR: author wrote a program in C that sums all bytes mod 256 of 1GB file into one byte.
It runs 2.5 sec first time when it reads file from SSD and just 0.6 sec second time when contents of the file is already in the OS disk cache.
- Sharlin 9y agoEh, that's just the first step. There's also mmapping, SIMD vectorization, cache locality, and using the perf tool.