Hacker News new | past | comments | ask | show | jobs | submit login

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-...




> 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…


Yes, 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.


I 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.


Interesting! Any rules-of-thumb you can share about that process?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: