Comment by robert_tweed
12 years ago
Exactly. There seems to be a huge amount of confusion here about this. Beyond that quote (which is excellent, btw) there's the point that creating machine-efficient data structures requires understanding the limitations of the architecture and packing the data in a way that it can be accessed efficiently by whatever algorithm you plan to use.
Things like whether you have an array of structs or a struct of arrays can have a massive effect on how the same algorithm will perform, because of factors like data locality, alignment and cache coherence (the latter mainly if it's a concurrent algorithm).
The trouble with studying algorithms without actually working on optimisation in a low-level language like C or Go is that it completely abstracts away what is really happening in the hardware, which is absolutely critical to real-world performance. In a LISP-like language you generally have no idea what the compiler is actually doing.
No comments yet
Contribute on Hacker News ↗