Darren New <dne### [at] san rr com> wrote:
> I remember reading where one customer had called up an Ada compiler
> manufacturer to complain their compiler was slow. The manufacturer asked to
> see the code and it was tremendously convoluted in terms of what library
> generics it instantiated and so on. The vendor asked why they were doing it
> this way, and the customer says "I modeled it on your sample XYZ." The
> vendor informs them that sample XYZ is a compiler stress-test designed to
> make the compiler run out of resources to ensure the compiler handles it right.
I have heard of projects which use extensively C++ template metaprogramming
to optimize things at runtime (I think at least some of those projects are
related to matrix manipulation). The programs take ages to compile, but the
resulting binaries are significantly faster than equivalent programs made
in more traditional ways. (I suppose it could be summarized as tons of
things being precalculated at compile time.)
(What makes these projects interesting is that template metaprogramming
is not just a curiosity, but it's actually being in some cases used for
great benefit.)
--
- Warp
Post a reply to this message
|