I tried some preliminary tests of the newly released gcc-4.6.0 with Gambit, and things look pretty good.
I was looking just at how long the routine direct-fft-recursive-4 in lib/_num.scm took to execute on an array of $2^{25}$ complex doubles. Here are various execution times comparing gcc-4.6.0 with the gcc-4.5.1 that ships with Ubuntu 10.10. I just did "./configure CC=...; make" on plain manilla gambit-4.6.0 with default optimization "-O1 -fschedule-insns2":
4.5.1: 3180 ms cpu time (3160 user, 20 system) 4.6.0: 2910 ms cpu time (2910 user, 0 system)
That's quite the improvement, nearly 10%
I also added -fschedule-insns to the optimization list:
4.5.1 -fschedule-insns: 2870 ms cpu time (2870 user, 0 system) 4.6.0 -fschedule-insns: 2730 ms cpu time (2730 user, 0 system)
Still about a 5% improvement.
Since there are 5 N \log_2 N operations in an FFT of size N, that last time represents 1.536 Gflops on my
model name : Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz
FFTW3 out-of-place (i.e, the same result, but not the same algorithm) achieves almost exactly 2 Gflops on a 3.0 GHz machine with a better memory system:
http://www.fftw.org/speed/CoreDuo-3.0GHz-icc64/
Scaling the results on my machine to the higher clock rate gives
(* 1.56 3.0 (/ 2.33))
2.008583690987124
(I don't feel like benchmarking fftw3 on my own machine, sorry.)
So who says you can't do scientific computing in Scheme?
Brad
PS: This is no April Fools joke!