FORTRAN (was Re: indentation)

Tim Peters tim_one at email.msn.com
Thu Dec 16 20:16:48 EST 1999


[Andrew M. Kuchling, on template metaprogramming in C++]
> The idea that C++ compilers are Turing complete blew me away.
> (Hours of fun ... if you're Tim Peters.)

Applying the wrong tool to the right job is indeed hours of fun, but hardly
to be recommended <wink>.

> In the paper Veldhuizen shows how to use this more practically,
> to generate unrolled code for things like FFTs, a complex
> optimization that no compiler is going to do for you.

And that no compile-time computation is going to do well (whether via
abusing C++ templates, or via systems that were actually intended for this
purpose (like Lisp's comprehensive code-synthesis subsystems)).  See

    http://www.fftw.org/

for the state of the art in FFT synthesis:  modern architectures are so
complex that you can't get peak speed anymore without feeding actual timings
back into the synthesis.  Alas, someone with a bad case of template fever
probably won't even feel ashamed when they trick their templates into doing
compile-time trial runs and I/O <wink>.

every-generation-has-to-learn-to-get-sick-of-its-reinvention-
    of-m4-ly y'rs  - tim






More information about the Python-list mailing list