On 2011-01-21, at 2:59 PM, Bradley Lucier wrote:
What kind of speedups do you see on your new version of fib with the native back end?
On x86-32 I tried fib_scm and fib_c. I removed the printf/display because the x86-32 back-end doesn't support Gambit's I/O library yet. I also played with various options and the inlining level and used (not interrupts-enabled) by default. The run time for the plain "no special tweaks" compilation of fib_scm on Gambit-C is also given. In parentheses is the time relative to the fastest time. I'm using this morning's Gambit-C patch which improves the speed of jumps to the return address.
gcc -m32 -O1 -fomit-frame-pointer 3.11s (3.3x) gcc -m32 -O2 -fomit-frame-pointer 2.72s (2.9x) gcc -m32 -O3 -fomit-frame-pointer 0.93s (1.0x) Gambit-x86-32 (inlining-limit 1000) 1.03s (1.1x) Gambit-C (inlining-limit 300) -cc-options "-O2" 1.31s (1.4x) Gambit-C (inlining-limit 300) 1.65s (1.8x) Gambit-x86-32 (not inline) 1.75s (1.9x) Gambit-x86-32 (not inline) (enable-interrupts) 2.11s (2.3x) Larceny x86 2.64s (2.8x)
So the code generated by the x86-32 back-end for fib_scm is about 10% slower than the code generated for fib_c by gcc -O3.
Marc