Review request for JDK-8025435

Thomas Wuerthinger thomas.wuerthinger at oracle.com
Tue Sep 23 13:46:05 UTC 2014


The implementation in HotSpot can obviously continue to build on top of Java bytecodes, as this is the format all JIT compiler built on top of HotSpot use for creating their compiler graphs. It seems however impractical to build a wrapper Java class with annotations for doing JavaScript micro benchmarking. One could think about adding a JavaScript API that allows to leverage JMH without this overhead. Scala has for example indeed the ability to define the benchmark fully in Scala. I think for JavaScript, this is currently not possible?

- thomas

On 23 Sep 2014, at 14:45, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:

> On 09/23/2014 03:29 PM, Thomas Wuerthinger wrote:
>> Interesting would be a harness specifically targeting JavaScript.
> 
> Interesting how? Practical? Benchmarking harnesses deal with low-level
> details, and so they need to be written in a lowest-level language
> possible. When you are targeting JVM, that is either bytecode, or a very
> trivial Java (I would not mind going straight to the compiler IR, but
> the only common IR so far is Java bytecode).
> 
> This is what JMH is already doing. Now you can call whatever hosted
> language from JMH @Benchmark. Scala, Kotlin, and Rhino/Nashorn already
> have a successful track record of doing this.
> 
> -Aleksey.
> 



More information about the nashorn-dev mailing list