[ODE] Faster ODE
Russ Smith
russ at q12.org
Fri Nov 22 15:05:02 2002
> 1) Blitz++ (http://www.oonumerics.org/blitz)
> 2) FFTW - The Fastest Fourier Transform in the West
i have used blitz and have found their approach to be more clever than it
is productive. the template meta-program idea results in exceptionally
long compile times, and not all compilers have the right optimization
strategies to take advantage of the generated code. gcc, for example, does
not seem to do terribly well at optimizing away the numerous stack-based
parameter-passing temporaries that such code generates. i considered blitz
for ODE but gave up on it in favour of explicitly written for-loops and
hand unrolling because (a) blitz is slower, (b) blitz increases the
compile time hugely, (c) blitz syntax sometimes obscures the actual
numerical operations that are being performed - and i like things to be
obvious and out in the open.
FFTW is new to me, thanks for the pointer.
there's also ATLAS, http://math-atlas.sourceforge.net/
ODE's factorizer is generated using an ATLAS-like parameter-finding
approach (look in the fbuild directory). that's why the fast-ldlt code
looks really complicated when the same thing could be implemented using 3
for-loops in about 20 lines of code. ideally the build process for ODE
should involve running the fbuild code to get the fastest factorizer on
your platform. the 'default' fastldlt etc code is just what happens to
work best on whatever platform i ran fbuild on. note that this default
code should still be significantly faster than the 3 for-loops approach on
all platforms (for matrices of greater than say 5x5 ?).
russ.
--
Russ Smith
http://www.q12.org/