Friday April 03, 2009
On Language Height and Optimization
As I see it, there are two poles on a language criterion to make a given program run fast:
- Write in a language which gives you as much control as possible over the
hardware, which implies fewer opportunities for high-level abstractions (tell
me with a straight face that idiomatic Ocaml code regularly worries about
memory usage to the byte and CPU register usage, for example).
- Write in a language with a sufficiently smart runtime optimizer that can remove the penalty for abstractions you don't use (and even some you do).
History suggests that the second option is almost always the right choice over time.