This is the mail archive of the guile@cygnus.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]

Speed of interpretation?



 I recently tried the usual factorial function:

 (define (fact n)
  (letrec ((fact-it
             (lambda (acc n)
              (if (= n 1)
                  acc
                  (fact-it (* n acc) (- n 1))))))
    (fact-it 1 n)))

 ... in several Scheme and Common Lisp implementations, and ran it as
 (fact 500).  Most of the interpretters, including `guile', take a few
 seconds of processing before they print out the huge number.  Some
 are faster than others.  I didn't actually time them, my results are
 subjective.

 One scheme though, Gambit-C 3.0's `gsi', prints the result almost
 instantly.  Wow!  It's really fast!  The speed difference is very
 noticable, and quite surprising.

 I wonder if there's anything to be learned from the Gambit-C 3.0
 implementation that could be used to improve the speed of guile?
 What does he do that makes it so quick?

 Maybe in a year of study, I'll be one of the people who could read
 the codes and discover that... today I'm not, so am now off to do
 some reading.  :-)