RFR: 8008733: Psr:perf:osb performance regression (18%) in wss_bodyenc

Aleksey Shipilev aleksey.shipilev at oracle.com
Sun Oct 13 15:12:07 UTC 2013


Hi Aleksej,

On 10/13/2013 02:00 PM, Aleksej Efimov wrote:
> The benchmark code:
>     @GenerateMicroBenchmark
>     @BenchmarkMode(Mode.AverageTime)
>     @OutputTimeUnit(TimeUnit.MICROSECONDS)
>     public void testMethod(BlackHole bh) {
>         bh.consume( new XPathContext() );
>     }

Not bad. The syntactic nit: you can "just" return the value and JMH will
feed it to the blackhole implicitly:

  @GenerateMicroBenchmark
  @BenchmarkMode(Mode.AverageTime)
  @OutputTimeUnit(TimeUnit.MICROSECONDS)
  public XPathContext testMethod() {
     return new XPathContext();
  }

> Benchmark results:
> Without proposed fix: 9,496 us/op
> With proposed fix: 8,570 us/op

Whoa, 8.5 us to create the XPathContext seems a lot. If the change in
performance for 8.5 -> 9.5 us/op was reported as performance regression,
I wonder if we should optimize XPathContext further. (Not in the scope
of this change of course).

-Aleksey.




More information about the core-libs-dev mailing list