<br><div class="gmail_quote">2011/1/26 Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca">feeley@iro.umontreal.ca</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
On 2011-01-24, at 4:00 PM, Marc Feeley wrote:<br>
<br>
><br>
> On 2011-01-21, at 2:59 PM, Bradley Lucier wrote:<br>
><br>
>> What kind of speedups do you see on your new version of fib with the native back end?<br>
><br>
> 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.<br>


><br>
> gcc -m32 -O1 -fomit-frame-pointer                3.11s (3.3x)<br>
> gcc -m32 -O2 -fomit-frame-pointer                2.72s (2.9x)<br>
> gcc -m32 -O3 -fomit-frame-pointer                0.93s (1.0x)<br>
> Gambit-x86-32 (inlining-limit 1000)              1.03s (1.1x)<br>
> Gambit-C (inlining-limit 300) -cc-options "-O2"  1.31s (1.4x)<br>
> Gambit-C (inlining-limit 300)                    1.65s (1.8x)<br>
> Gambit-x86-32 (not inline)                       1.75s (1.9x)<br>
> Gambit-x86-32 (not inline) (enable-interrupts)   2.11s (2.3x)<br>
> Larceny x86                                      2.64s (2.8x)<br>
<br>
</div>I added a simple optimization to the x86 back-end (using the "lea" instruction to compute r1=r2+n instead of a "mov" and "add").  This has improved the execution time:<br>
<br>
gcc -m32 -O1 -fomit-frame-pointer                       3.11s (3.42x)<br>
gcc -m32 -O2 -fomit-frame-pointer                       2.72s (2.99x)<br>
gcc -m32 -O3 -fomit-frame-pointer                       0.93s (1.02x)<br>
Gambit-x86-32 (inlining-limit 1000)                     0.91s (1.00x)<br>
Gambit-x86-32 (inlining-limit 300) (enable-interrupts)  1.06s (1.16x)<br>
Gambit-x86-32 (not inline)                              1.81s (1.99x)<br>
Gambit-x86-32 (not inline) (enable-interrupts)          2.12s (2.33x)<br>
Larceny x86                                             2.64s (2.90x)<br>
<br>
Now Gambit with the x86-32 back-end is slightly faster than gcc -O3.<br>
<div><div></div><div class="h5"><br>
Marc<br>
<br>
_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
</div></div></blockquote></div><br><br>Amazing. I'm so looking forward taking a look at that backend :)<br><br>Thank you for this great work!<br><br>Álvaro<br><br><br>