The Great Startup Problem

Thomas Wuerthinger thomas.wuerthinger at
Mon Aug 25 14:38:20 UTC 2014


Truffle is such a general-purpose automatic specialization mechanism that works like you say via just writing Java code and without a need to use invokedynamic and without a need to dynamically generate bytecodes.

- thomas

On 25 Aug 2014, at 15:25, Charles Oliver Nutter <headius at> wrote:

> On Mon, Aug 25, 2014 at 6:59 AM, Fredrik Öhrström <oehrstroem at> wrote:
>> Calle Wilund and I implemented such a indy/methodhandle solution for
>> JRockit, so I know it works. You can see a demonstration here:
>> That
>> implementations jump to C-code that performed the invoke call, no fancy
>> optimizations. Though the interpreter implementation of invoke can be
>> optimized as well, that was the first half of the talk is about. But its
>> really not that important for speed, because the speed comes from inlining
>> the invoke call chain as early as possible after detecting that an indy is
>> hot.
> But can it work in C2? :-)
> My impression of C2 is that specialization isn't in the list of things
> it does well. If we had a general-purpose specialization mechanism in
> Hotspot, things would definitely be a *lot* easier. We might not even
> need indy...just write Java code that does all your MH translations
> and specialize it to the caller's call site.
> We can certainly get C2 to do these things for generating a
> crapload of mostly-redundant bytecode. Oh wait...
> - Charlie
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at

More information about the mlvm-dev mailing list