API review of VarHandles

Paul Sandoz paul.sandoz at oracle.com
Wed Jan 27 08:44:36 UTC 2016


> On 26 Jan 2016, at 22:46, Brian Goetz <brian.goetz at Oracle.COM> wrote:
> 
> I think that expectation is just out of date (if not outright mistaken.)  Yes, j.l.i was originally called "java.dyn", but prior to shipping *7* we renamed it to j.l.i precisely because it had turned into a general customizable linkage mechanism that was usable far beyond dynamic languages. (To wit, Java 8 lambdas got a significant linkage/capture boost from using invokedynamic.)  So to claim it's "supposed to be" only for dynamic languages represents a significant "missing of the memo.”
> 

Furthermore, Java has always been quite dynamic under the covers of the language. See also Aleksey’s recent indy string concat enhancements. In future this area is likely to be leveraged further. And i know Remi’s is always on the look out to expose indy up to into the language :-) and with good reason.

Paul.

> 
> On 1/26/2016 3:31 PM, Martin Buchholz wrote:
>> There's a big "expectations" effect here.  j.l.invoke is "supposed to
>> be" for making dynamic languages less slow, not for making low-level,
>> ultra-non-dynamic operations faster.  Asking the Unsafe users of the
>> world to switch to dynamic VarHandle is like asking C programmers to
>> rewrite their code in perl 6 ... for performance!  It's the same
>> "srsly?" feeling one gets reading """We can currently use RPerl to
>> speed up low-magic Perl 5 code with over 300x performance gain."""
> 



More information about the valhalla-dev mailing list