Clifford Heath wrote:
> Charles Oliver Nutter wrote:
>> The fact that classes are open doesn't really impact Ruby performance 
>> all that much.
> 
> That's true for single-process benchmarks where you don't implement
> sharing of compiled modules. In a compiler-interpreter I once worked
> on, we serialised the bytecode to a memory-mappable file for each
> cluster of modules, which did a lot to improve startup performance,
> especially for subsequent instances. Not possible for Ruby however,
> doe to the open classes - QED.

Startup time does not general performance make. Just ask Java :)

> The other performance factor (related to a different discussion) that
> makes byte-code interpretation faster than AST-interpretation is that
> with byte-code, you get much better locality of reference, so your
> cache+memory system works much better. This is a *very* significant
> factor that justifies some recent complaints. It's also quite possible
> for Ruby interpreters to implement, despite open classes.

JRuby has successfully implemented a full Ruby 1.8 to Java bytecode 
compiler (as of about ten minutes ago), so it is indeed possible...and 
nicely fast.

- Charlie