Nashorn: Optimizing JavaScript and Dynamic Language Execution on the JVM

Опубликовано: 29 Октябрь 2024
на канале: Parleys
307
3

There are many implementations of JavaScript, meant to run either on the JVM or standalone as native code. Both approaches have their respective pros and cons. The soon-to-be open sourced Oracle Nashorn JavaScript project is based on the former approach. This presentation goes through the performance work that has gone on in Oracle’s Nashorn JavaScript project to date in order to make JavaScript-to-bytecode generation for execution on the JVM feasible. Aside from covering the Nashorn project itself, we show that the new invoke dynamic bytecode gets us part of the way there but may not quite be enough. What other tricks did the Nashorn project use? The presentation also discusses future directions for increased performance for dynamic languages on the JVM, covering proposed enhancements to both the JVM itself and to the bytecode compiler.


Author:
Marcus Lagergren
Marcus Lagergren has an MSc in computer science from the Royal Institute of Technology in Stockholm, Sweden. Lagergren has a background in computer security but has worked with runtimes since 1999. He was one of the founding members of Appeal Virtual Machines, the company that developed the JRockit JVM, which was bought by BEA Systems in 2002. Lagergren has been team lead and architect for the JRockit code generators and has been involved in most other aspects of JVMs over the years. From 2007 to 2010 he worked for Oracle on fast virtualization technology, and since late 2011 has been a member of the Oracle langtools team, investigating dynamic languages on the JVM. Lagergren is also a general runtime futurist, and co-author of the book Oracle JRockit: The Definitive Guide, which, despite the product-centric title, has been praised as the best book ever written on JVM internals in general.