API review of VarHandles
michael.haupt at oracle.com
Tue Jan 26 22:11:14 UTC 2016
how about seeing j.l.i as a framework for lightweight reflection on the one hand, and for method handle-based meta-programming on the other? That's clearly usable beyond the domain of dynamic language implementation. Granted, the latter remains an important application area, but there are others. For example, JEP 280 uses invokedynamic for string concatenation.
In that vein, how about seeing VarHandles as a safer replacement for some of the Unsafe API? It's going to be public API, readily usable without having to enable access to the carefully tucked-away Unsafe.
> Am 26.01.2016 um 21:31 schrieb Martin Buchholz <martinrb at google.com>:
> 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."""
Dr. Michael Haupt | Principal Member of Technical Staff
Phone: +49 331 200 7277 | Fax: +49 331 200 7561
Oracle Java Platform Group | LangTools Team | Nashorn
Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam, Germany
ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
<http://www.oracle.com/commitment> Oracle is committed to developing practices and products that help protect the environment
More information about the valhalla-dev