2 ms·
I like it how he demonstrates the thought process. It seems quite a mechanical recipe that can be applied to a lot of similar problems: Step 1:. A slow but ea
by hyperman1 3y ago
I like it how he demonstrates the thought process. It seems quite a mechanical recipe that can be applied to a lot of similar problems:
Step 1:. A slow but easy implementation. It allows to make sure the algorithm is correct, and later allows validating the faster variants.
Step 2: Algorithm and datastructure optimization, guided by profiling.
Step 3: Micro optimization, again guided by profiling. A standard bag of tricks is applied. I didn't see cache friendlyness/tiling in here, which surprised me.
Step 4: Parallelism, first by SIMD then by threads.
I am very much not downing the author: This is a great teaching of the process, it's a lot of hard brainy work, and we didn't see everything he tried but which failed. So thank you, author.
My point is: it is not magic. It is engineering. It is a skill that can be aquired, thought, even planned and measured.
- xyst 3y ago> My point is: it is not magic. It is engineering. It is a skill that can be aquired, thought, even planned and measured. Unfortunately in this day and age, the art of optimization is lost. Companies are willing to ship shitty code to production and increase performance by throwing more hardware at it.