3 ms·
Yes, but be careful with this if your algorithms knowledge comes from a traditional algorithms course. These are often taught as if computational complexity wa
by djcapelis 17y ago
Yes, but be careful with this if your algorithms knowledge comes from a traditional algorithms course. These are often taught as if computational complexity was the only concern. Algorithms that minimize space complexity are often more of an issue.
So while the choice of algorithm is a large issue, one must be careful to select an algorithm that makes the appropriate space vs. computation tradeoff. That knowledge is often guided by an awareness of where the systems bottlenecks are.
Once you've chosen the correct algorithm and you're down to optimizing code, which is what this article discusses, understanding cache effects is critical and this article provides a nice view of the basics. The usual rules about not doing optimization unless one needs to applies, but I don't see why that always merits an algorithms junkie popping out of the woodwork to essentially say the same thing everyone always says: premature optimization is dumb.
- palish 17y agoMan, you are reading way way too far into what I said. Aren't introverts like us supposed to always be taking statements at face value? And isn't what I said true? Attacks like "algorithms junkie", and completely shoving words into my mouth just make me not want to be here anymore. For the record, I write software rasterizers for fun. I optimize code using SSE2. I code mainly in C++. I am the target audience for this article. Maybe you were trying to illustrate a contrasting point of view, which is fine, but it is stupid to make it so personal.
- sketerpot 17y agoI don't think that "algorithms junkie" is an insult; I'd happily call myself an algorithms junkie, for example. Algorithms are awesome, and so are people who write software rasterizers. (And you know what? Figuring out algorithms that work well on modern hardware is loads of fun.)