I deal exclusively with OO when it comes to programming, which, unfortunately, means that highly optimized code is not my forte. I am pretty good at C and usually do it reasonably prudently, but it's still hard for me to think about the best way to handle situations.
One example would be:
int strlen(const char* str) { char* s; for (s=str; *s; ++s); return s-str; }
I would never have thought of it myself.
So what are the good resources that optimized code provides you with? I would like to find a place where I could read the theory behind it, which makes the compiler in the background, which makes it useful, etc.
It would be nice if some resources were noted for studying optimized data structures using real-world scenarios, but this is probably too much to ask.
source share