Yesterday at the MSLUG meeting Houman Zolfaghari gave an interesting talk on the use of Scheme in the "real-world". In his presentation he said that in his work he uses both C++ and Scheme; the parts that do floating-point intensive computations are programmed in C++ and the scripts are written in Scheme. An audience member asked why Scheme was not being used for the numerical computations. Houman stated, as if it was common knowledge, that C++ had better performance than Scheme on numerical computations. I have heard this misconception from several people, and I am compelled to set the record straight, at least to the MSLUG members who should know better.
Brad Lucier has been using Gambit-C for floating-point intensive computations for a long time. His involvement with Gambit-C has helped me improve the compiler's performance on numerical computation. For the kind of computations that he does (partial differential equations) the performance of Gambit-C is equal to that of C. The short paper he wrote on the subject, presented at the 2000 Scheme workshop, is:
http://www.ccs.neu.edu/home/matthias/Scheme2000/lucier.ps
Of course the performance compared to C++ might be different for different numerical computations. The important message here is that the performance of floating point code can be in the same ballpark as C ++. If some computational kernels are critical to overall performance, it might even be possible to beat C++ by doing some agressive loop unrolling and function inlining of the kernel (which Gambit-C does automatically based on programmer declarations).
Marc