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]

Re: bytecode interpreter + dynamic compilation


Doug Evans wrote:
> 
> Here's a wild half-baked thought.
> 
> Suppose Guile used a bytecode interpreter and used dynamic compilation
> for speed when needed?  A dynamic compiler for Scheme doesn't appear
> to require any rocket science, and I think the speed up would be substantial.

Do you mean a dynamic compiler _to_ bytecode, or _from_ bytecode to machine
code? The SCM code on which Guile is based is faster than any bytecode
interpreter for Scheme, so compiling to bytecode would not help. Dynamically
compiling to machine code would certainly be doable, but it seems to me that
compiling Guile treecodes is not that much harder than compiling bytecode.

> No claim is made that this is a new idea.  It's old (if not ancient).
> The "wild half-baked" part comes from suggesting Guile do this
> instead of using SCM.
> 
> One downside of dynamic compilation is of course the host dependence.
> I can see the GNU project having a need for a general dynamic
> compilation toolkit (and Guile would be just another user of it).  If
> this toolkit was generally useful I think it would attract more apps
> and more ports.  In time any platform on which Guile users wanted
> dynamic compilation would have it.

Well, if GCC were made into a library or the bytecode representation
were something with universally available JIT, such as JVM bytecodes,
it would not be a problem.

But actually, I think Guile is fast enough for most purposes to which
it will be put, i.e. scripting and extension language work. The only
huge performance problem right now is the startup time, and I don't
think dynamic compilation would help with that.

 - Maciej

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