[gambit-list] Running times: real vs. CPU
Taylor Venable
taylor at metasyntax.net
Sat Apr 25 21:58:39 EDT 2009
On Sat, Apr 25, 2009 at 09:17:01PM -0400, Jeremie Lasalle Ratelle wrote:
> You need to compile a dynamic module like this
>
> $ gsc 092.scm
>
> That will give you 092.o1
> This invokes the gsc-cc-o.bat script which calls gcc with the correct
> arguments. For example, you weren't compiling your module in
> single-host mode as single-host is a preprocessor flag.
Even doing that method though, the real-to-CPU time ratio is the same:
475 [ taylor @ zeltennia ] : ~/cvs_public/Programs/Euler/Scheme > gsc 092.scm
476 [ taylor @ zeltennia ] : ~/cvs_public/Programs/Euler/Scheme > time gsi 092.o1
SOLUTION = 8581147
real 0m43.636s
user 0m18.000s
sys 0m7.270s
Or when using -D___SINGLE_HOST with GCC:
478 [ taylor @ zeltennia ] : ~/cvs_public/Programs/Euler/Scheme > cp 092.scm compiled.scm
479 [ taylor @ zeltennia ] : ~/cvs_public/Programs/Euler/Scheme > gsc -link compiled.scm
480 [ taylor @ zeltennia ] : ~/cvs_public/Programs/Euler/Scheme > gcc -O2 -D___SINGLE_HOST \
-I/opt/gambit/include -L/opt/gambit/lib compiled.c compiled_.c -lgambc -lutil -lm
481 [ taylor @ zeltennia ] : ~/cvs_public/Programs/Euler/Scheme > time ./a.out
SOLUTION = 8581147
real 0m44.409s
user 0m18.460s
sys 0m7.410s
Am I doing something wrong here?
Thanks,
--
Taylor Christopher Venable
http://real.metasyntax.net:2357/
More information about the Gambit-list
mailing list