This repository contains a few solutions to the 1brc implemented in Python.
- @WouterLVV for finding a 0.5s speed up by using try/except instead of if/else in
process_line
🔥 - @adamfarquhar for implementing a chunk-based solution that is nearly as fast as mmap, and also showing that we don't need to throw away good software design for the sake of speed 🚀
Follow the instructions for generating data in the original 1brc repository
Copy or symlink them to data/measurements.txt
.
Run
bash eval.sh | python calc_stats.py