brian.goetz at oracle.com
Sun Apr 22 15:30:50 PDT 2012
> It's always better to do adaptation at runtime.
> The runtime will not be able to know the the real intent if the compiler
> do adaptation
> so you loose information. The VM does adaptation better than the compiler
> (because it can teach the JIT, the information can be carried on to the
> So adaptation you only be done at runtime or you lost optimization
Its not black and white. For example, by simplifying the metafactory
protocol, you increase the chance that SAM conversion can be
intrinsified, where is where the really big wins come from. Frankly
varargs is a corner-enough case that I would gladly give up some
optimization of varargs if I got something better for all other lambdas.
More information about the lambda-dev