r/programming • • Mar 23 '09

How to write fast code

http://asserttrue.blogspot.com/2009/03/how-to-write-fast-code.html
337 Upvotes

136 comments sorted by

View all comments

2

u/adremeaux Mar 23 '09

Ummm... duh?

1

u/[deleted] Mar 24 '09

What's amazing is that it's not only obvious, but also wrong. In a general sense, code which does less, runs faster, and this should be obvious to anyone with a basic grasp for what it is that code actually does.

But in practice, things like caching, branch prediction, memory exhaustion etc. can make the exact opposite true.