evan_tech

Previous Entry Share Next Entry
Here's a paper I recently enjoyed that for once I think wasn't from Lambda the Ultimate: Impact of economics on compiler optimization.
Compile-time program optimizations are similar to poetry: more are written than are actually published in commercial compilers. Hard economic reality is that many interesting optimizations have too narrow an audience to justify their cost in a general-purpose compiler, and custom compilers are too expensive to write. An alternative is to allow programmers to define their own compile-time optimizations. This has already happened accidentally for C++, albeit imperfectly, in the form of template metaprogramming. This paper surveys the problems, the accidental success, and what directions future research might take to circumvent current economic limitations of monolithic compilers.
The bit on template metaprogramming is especially interesting: that C++ programmers are willing to bend over backwards to write their own compile-time optimizations is telling. And, the irony of using functional programming (templates) to get more performance out of an imperative language.

PS: Citation #16 in that is Lamping, whom I'm sorta working with on a project right now; he's better known for his paper titled Aspect-Oriented Programming (2.1k+ citations!).