Etat actuel au 25 mai 1999
Condition de test |
Les bench tournent sur un K6 400 pas trop chargé. Il sont effectués 3 fois, je donne le meilleur résultat (temps utilisateur).
Bench loop |
Boucle à vide, 3'000'000 fois.
crad@mulder$ cat loop.scm (define loop (lambda (i l) (if (< i l) (loop (+ 1 i) l) l))) (loop 0 3000000)crad@mulder$ time qscheme < loop.scm ; S : Daniel Crettol (c) 1999 ; init modules... ; loading kernel ; loading macros > #undefined > 3000000 > real 0m1.681s user 0m1.420s sys 0m0.000s
crad@mulder$ scm SCM version 5d0, Copyright (C) 1990-1999 Free Software Foundation. SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'. This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)' for details. crad@mulder$ time scm < loop.scm
#
3000000 real 0m4.116s user 0m3.960s sys 0m0.020s
crad@mulder$ guile --version Guile 1.3.1 Copyright (c) 1995, 1996, 1997 Free Software Foundation Guile may be distributed under the terms of the GNU General Public Licence; certain other uses are permitted as well. For details, see the file `COPYING', which is included in the Guile distribution. There is no warranty, to the extent permitted by law. crad@mulder$ time guile < loop.scm guile> guile> 3000000 guile> real 0m21.101s user 0m20.720s sys 0m0.030s
crad@mulder$ perl --version
This is perl, version 5.004_04 built for i386-linux
Copyright 1987-1997, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit.
crad@mulder$ time perl -e 'for ($i = 0; $i <3000000;$i++){}'
real 0m2.821s user 0m2.800s sys 0m0.000s
Fibbonaci |
Suite de fibonnaci: teste la récursion.
crad@mulder$ cat fib.scm (define (fib n)(if (<= n 2) 1 (+ (fib (- n 1)) (fib (- n 2))) ) ) (fib 30) (fib 30) (fib 30)
crad@mulder$ time qscheme < fib.scm ; S : Daniel Crettol (c) 1999 ; init modules... ; loading kernel ; loading macros > #undefined > 832040 > 832040 > 832040 > real 0m3.046s user 0m2.650s sys 0m0.000s
crad@mulder$ time scm < fib.scm
#
832040 832040 832040 real 0m7.232s user 0m7.030s sys 0m0.010s
crad@mulder$ time guile < fib.scm guile> guile> 832040 guile> 832040 guile> 832040 guile> real 0m33.937s user 0m32.880s sys 0m0.070s
Conclusion |
Ne jamais rien conclure. Mais ca tourne quand même vachement vite... :)))
D. Crettol dan@sof.ch | Modifie le 25/05/1999 22:10:50. |