3 ms·
I hardly ever bother optimizing my code anymore, with -O3 nothing I do ever really seems to make a difference. The real reason to use "const" is to show intent
by klingonopera 7y ago
I hardly ever bother optimizing my code anymore, with -O3 nothing I do ever really seems to make a difference.
The real reason to use "const" is to show intent.
See "Const and Rigid Parameters" in this wonderful article about the Doom 3 source code: https://kotaku.com/the-exceptional-beauty-of-doom-3s-source-code-5975610 https://kotaku.com/the-exceptional-beauty-of-doom-3s-source-...
- saagarjha 7y ago> I hardly ever bother optimizing my code anymore, with -O3 nothing I do ever really seems to make a difference. Your choice of data structure or algorithm would…
- klingonopera 7y agoYes, true, though I consider that "structural/procedural" optimization as opposed to "technical" optimization. This means, I won't bother using "inline" anymore, but I will consider how many subfunctions in total I'd call.
- planteen 7y agoI find that I can sometimes get significant speedups by changing data access patterns when considering cache. I have found this to be the first and most valuable thing to tune, before attempting SIMD.
- klingonopera 7y agoInteresting! Any rules-of-thumb you can share about that process?