I understood your remark. I just believe that this restriction is not fundamental to JMH and there *could* be support for languages that do not statically compile to Java bytecodes as well.
- thomas On 23 Sep 2014, at 15:48, Aleksey Shipilev <[email protected]> wrote: > 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. >
