Joseph McDonald <joe / vpop.net> wrote in message news:<981206729184.20020210140618 / vpop.net>...
> Sunday, February 10, 2002, 2:03:22 PM, you wrote:
> 
> t> What is it?
> t> -----------
> t> The very, very beginnings of a bytecode interpreter for Ruby.
> 
> George, I assume this will speed up execution time?  Do you have any
> benchmarks for simple code that just does hash and array manipulation?
> 
> thanks,
> -joe

I would like to know what are the expected benefits to using
bytecodes, and why.  For instance, it's not at all clear to me why
interpreting bytecodes should be any faster than interpreting tree
structures as Ruby does now -- in fact, I would expect that it would
be slower because of the need to reconstruct word-size elements (or
other data structures) from the bytecode stream.  On the other hand,
compiling might be a little quicker because one could avoid constantly
having to allocate memory for lots of little tree nodes.

The principal advantage that I can see is the ability to store the
compiled bytecode stream in a file.  But then the process of reading
it back and interpreting it, although quicker than going through a
full compilation, would be slowed by the need to verify that the
stream is not corrupt in some way.

Can anybody comment on this?

Alan Stern