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

librep's indirect threaded bytecode interpretter



 `librep.sourceforge.net' is a GPL'd Lisp-1 extension language
 library.  It's used by the `sawfish' window manager.  Recently, the
 byte code interpretter was rewritten to utilize an indirect threaded
 code technique that was invented for Forth interpretters.  It's
 pretty neat, and worth haveing a look at.

 It is very fast also.  I ran a simple benchmark today, between `rep'
 and `guile'.  I defined an iterative factorial function, (the classic
 one that passes an accumulator and (1- n) via a tail-call), and ran
 it 1000 times in a loop with (fact-it 1 400).  Guile took almost a
 minute to finish, and `rep' finished in about 5.2 seconds.  An older
 version of `rep', predating the indirect threaded engine, ran it in
 5.6 seconds.  Perhaps this explains the performance difference
 between `scwm' and `sawfish'?  I understand that this wasn't much of
 a benchmark test... it doesn't really run through everything the two
 interpretters are capable of.

 Any chance that a similar byte code machine for Guile will ever be
 implemented?  I would really like Guile to be that quick.  It's a
 better language, at this stage, perhaps.  They also have a module
 system that is probably worth having a look at.

-- 
Those who do not study Lisp are doomed to reimplement it - Poorly.
A few months in the laboratory often saves several hours at the library.

mailto:karlheg@debian.org (Karl M. Hegbloom)

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