|
|
|
|
|
by rockwotj
897 days ago
|
|
Yeah so I had a discussion on Twitter about this, turns out 12GB is small enough to fit into memory, and the author runs submissions by running a solution 5 times in a row, so using direct IO actually hurts because having the kernel cache is a way to enforce the file is in memory for the 4 runs after. I have a direct IO solution with SIMD string search and double parsing, just in C++ (using libraries). It runs in 6 seconds on my 24 core linux box (NVMe). Code: https://github.com/rockwotj/1brc Discussion on Filesystem cache: https://x.com/rockwotj/status/1742168024776430041?s=20 |
|