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.

Reply via email to