On Sep 11, 2009, at 8:04 PM, Eduardo Cavazos wrote:
Aziz, do you have any suggestions for improving the time of the FP
version?
The "cp0-size-limit" seems to be set to a very conservative value.
On my machine, I get:
$ ikarus -O2 --r6rs-script /tmp/fib.ss
running stats for (fib 34):
no collections
931 ms elapsed cpu time, including 0 ms collecting
934 ms elapsed real time, including 0 ms collecting
0 bytes allocated
Now if I put these two lines in my ~/.ikarusrc:
(import (ikarus))
(cp0-size-limit (* 2 (cp0-size-limit)))
I get:
$ ikarus -O2 --r6rs-script /tmp/fib.ss
running stats for (fib 34):
no collections
157 ms elapsed cpu time, including 0 ms collecting
159 ms elapsed real time, including 0 ms collecting
0 bytes allocated
which actually beats the vanilla scheme version you posted:
$ ikarus -O2 --r6rs-script /tmp/schemefib.ss
running stats for (fib 34):
no collections
184 ms elapsed cpu time, including 0 ms collecting
185 ms elapsed real time, including 0 ms collecting
0 bytes allocated
I don't think you can ask for more. :)
Aziz,,,