Review request for JDK-8025435

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Sep 23 13:48:50 UTC 2014


On 09/23/2014 05:46 PM, Thomas Wuerthinger wrote:
> Scala has for example indeed the ability to define the benchmark
> fully in Scala. I think for JavaScript, this is currently not
> possible?

As I said before, to quote:

"JMH supports statically compiled languages already, since we can
operate on bytecode. Dynamically compiled languages are supported with
the help of javax.script.* APIs."

Scala is statically compiled to bytecode, and therefore we can process
the bytecode with JMH, as if we are operating in "native" environment.
JavaScript is (at least with Nashorn) is compiled to bytecode
dynamically, and the only sane entry point for benchmarking is
javax.script.*. Same thing applies for JRuby, Clojure (not AOT), etc.
etc. etc.

-Aleksey.



More information about the nashorn-dev mailing list