On Mon, Jul 6, 2009 at 8:31 PM, Jim Baker<[email protected]> wrote:
> Although I would prefer to have large code objects too, I don't see this as
> a high priority for Java 7. For Python, such code objects are invariably
> generated code, typically for initializing data structures, and are not
> performance critical. I'd imagine that's the typical use case seen in other
> languages. So unless the required changes are truly minimal, it may make
> more sense to invest development attention in areas with greater payoff.

In JRuby, it's not really a "problem" to have large bodies of code,
but it does limit some use cases. For example, people often want to
AOT compile everything for obfuscation purposes. If there's large
bodies of code that don't fit into 64k, we're stuck. We also would
like to have a mode that runs 100% compiled, and if there's giant
chunks of code we can't do anything with them.

We are, on the other hand, working on a new compiler that should make
it easier to split logic into pieces. It's just one of those
implementation headaches we have to deal with...just like other
platforms do.

And as I've said many times, it's all our collective work on JVM
languages that have made improvements like JSR292, JSR223, debugging,
.class file format, standard MOP, and much more important projects. I
would just like to see us as language implementers spending more time
collaborating on common projects, like hacking javac (it's fun,
really!) or improving .class format or what have you. Grousing about
long-time limitations of the platform makes noise but doesn't
necessarily accomplish anything.

> Incidentally, it would be nice if large switches got faster... :)

We would love to have a bytecode interpreter in JRuby, but the large
switch performance is the limiting factor. Alternatively you may want
to look at implementing your interpreter by loading the bytecodes into
their own polymorphic Instruction objects...you'll see *substantially*
improved performance as a result.

- Charlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to