Python Speed Question and Opinion

Jacek Generowicz jacek.generowicz at cern.ch
Wed Jun 9 02:55:27 EDT 2004


cookedm+news at physics.mcmaster.ca (David M. Cooke) writes:

> Those are interesting examples: FFTW actually uses routines coded in
> assembly language,

Just to expand on FFTW, as it is a very good example (which I was
tempeted to mention in my initial message). FFTW is based around
"codelets" written in C. But the codelets themselves were not written
by a human, they were written by an OCaml program, which itself was
written by a human. The really fascinating point about this is that
the codelet generator came up with a few very domain-specific
algorithms which were actually more efficent than any known to man
until that time, in spite of it having been a set of algorithms which
had been studied for decades. 

http://fftw.org/pldi99.pdf

So, the moral of the story is, once again, that generating low-level
code by hand is likely not to be the way to get the fastest performing
code in the end; getting a higher level language to do it for you is
likely to be a better way to go.



More information about the Python-list mailing list