This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: debug evaluator is faster than regular one?
- To: Keisuke Nishida <kxn30 at po dot cwru dot edu>
- Subject: Re: debug evaluator is faster than regular one?
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 25 Jul 2000 22:27:31 +0200
- Cc: guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <m3em4icace.fsf@indy.STUDENT.CWRU.Edu>
- Reply-To: djurfeldt at nada dot kth dot se
Keisuke Nishida <kxn30@po.cwru.edu> writes:
> Trying the latest Guile on the CVS, I found that the debug evaluator
> is faster than the regular evaluator:
>
> % guile
> guile> (time (do ((n 1000000 (1- n))) ((< n 0))))
> clock utime stime cutime cstime gc
> 8.64 8.5 0.14 0 0 6.5
You're running the debug evaluator here as well.
> % guile --debug
> guile> (time (do ((n 1000000 (1- n))) ((< n 0))))
> clock utime stime cutime cstime gc
> 6.76 6.74 0.01 0 0 4.55
>
> Is this the expected result?
Seems strange. We should check if this is reproducible and then find
the reason.
The difference between the two cases is that case 1 switches on the
debugging evaluator when the interactive session starts while case 2
has it switched on from the beginning of the boot.
> By the way, I just started writing a VM for Guile. For now, it seems
> faster than QScheme in this simple example...
>
> % echo '(do ((n (* 1000000 100) (1- n))) ((< n 0)))' | time qscheme
> ; QScheme 0.5.1 - A fast implementation of the Scheme language
> ; Copyright (C) 1998-2000 Daniel Crettol <dan@sof.ch>
> ; QScheme is distributed under the GNU General Public Licence.
> ; See the COPYING and LICENCE_EXCEPTION files for more informations.
> ;
> ; Native threads enabled...
> ;
> ; macro.scm ok
> ; sgtk/defextern.scm ok
> ; s.scm ok
> QScheme> #t
> QScheme>
> 9.97user 0.03system 0:10.03elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (193major+162minor)pagefaults 0swaps
>
> % guile-vm
> guile> (define code (compile '(do ((n (* 1000000 100) (1- n))) ((< n 0)))))
> guile> (time (vm-run (make-vm) code))
> clock utime stime cutime cstime gc
> 7.79 7.79 0 0 0 0.03
>
> Oh, it's about 100 times faster than the current Guile :) (Of course,
> this is a special case.)
>
> I'll announce this after making closures work...
This is really exciting! I'm waiting... 8-)
Have you studied the technology used in QScheme before starting work
on your own VM?
/mdj