This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

debug evaluator is faster than regular one?


Hello,

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

  % 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?

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...

Thanks,
Keisuke Nishida

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]