2 ms·
I wasted weeks hand optimizing assembly because I benchmarked on random data
- anitil 2y agoThis was a really refreshing read! It's so easy to measure the wrong thing and build optimisations that make zero difference. I spent hours making a perfect hashing module for Python using gperf, all of the micro-benchmarks looked better, but in the end it was basically comparable to (possibly even slower than) CPython's built-in dict, with the downside of not being modifiable after creation I've recently been listening to 'Signal and Threads' by Jane Street and there was a recent episode on performance optimisation and it hits a few of the same notes [0], worth a listen if you have time. [0] https://signalsandthreads.com/performance-engineering-on-hard-mode/ https://signalsandthreads.com/performance-engineering-on-har...