Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29520 > unrolled thread

Benchmarking

Started byJoerg Meier <joergmmeier@arcor.de>
First post2014-08-03 18:13 +0200
Last post2014-08-05 07:21 +0200
Articles 3 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Benchmarking Joerg Meier <joergmmeier@arcor.de> - 2014-08-03 18:13 +0200
    Re: Benchmarking Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2014-08-03 12:04 -0700
      Re: Benchmarking Robert Klemme <shortcutter@googlemail.com> - 2014-08-05 07:21 +0200

#29520 — Benchmarking

FromJoerg Meier <joergmmeier@arcor.de>
Date2014-08-03 18:13 +0200
SubjectBenchmarking
Message-ID<pw54eqexxnm.jwkyd2uo8ri3$.dlg@40tude.net>
Hello,

since more than once people in this group have brought up micro benchmarks,
myself included, and many of them were incredibly flawed (like ignoring JVM
warmup), I thought this link might be interesting to others:

Rules that every microbenchmark should follow to be considered relevant:

<https://wikis.oracle.com/display/HotSpotInternals/MicroBenchmarks>

And a short writeup JMH:

<http://ashkrit.blogspot.de/2013/07/how-to-write-micro-benchmark-in-java.html>

A fantastic way to generate micro benchmarks without having to worry about
the framework through a handful of convenient annotations, not unlike unit
tests.

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

[toc] | [next] | [standalone]


#29532

FromKevin McMurtrie <mcmurtrie@pixelmemory.us>
Date2014-08-03 12:04 -0700
Message-ID<mcmurtrie-496FDB.12040903082014@news.sonic.net>
In reply to#29520
In article <pw54eqexxnm.jwkyd2uo8ri3$.dlg@40tude.net>,
 Joerg Meier <joergmmeier@arcor.de> wrote:

> Hello,
> 
> since more than once people in this group have brought up micro benchmarks,
> myself included, and many of them were incredibly flawed (like ignoring JVM
> warmup), I thought this link might be interesting to others:
> 
> Rules that every microbenchmark should follow to be considered relevant:
> 
> <https://wikis.oracle.com/display/HotSpotInternals/MicroBenchmarks>
> 
> And a short writeup JMH:
> 
> <http://ashkrit.blogspot.de/2013/07/how-to-write-micro-benchmark-in-java.html>
> 
> A fantastic way to generate micro benchmarks without having to worry about
> the framework through a handful of convenient annotations, not unlike unit
> tests.
> 
> Liebe Gruesse,
> 		Joerg

HotSpot inlining needs to be considered too, and that depends on the 
global environment.  Not only is that difficult to benchmark, but it can 
dynamically change in the running application too.  The difference can 
be enormous for stream parsing, audio, graphics, etc.

You'd benchmark this to know whether or not to refactor your optimized 
classes so that there is never more than one usable declaration of a 
method that must be optimized.  It's not always easy, such as when 
optimizing older JRE abstract base classes where everything is 
synchronized and subclassed everywhere.

[toc] | [prev] | [next] | [standalone]


#29564

FromRobert Klemme <shortcutter@googlemail.com>
Date2014-08-05 07:21 +0200
Message-ID<c4b7vmF4e3tU1@mid.individual.net>
In reply to#29532
On 03.08.2014 21:04, Kevin McMurtrie wrote:

> HotSpot inlining needs to be considered too, and that depends on the
> global environment.  Not only is that difficult to benchmark, but it can
> dynamically change in the running application too.  The difference can
> be enormous for stream parsing, audio, graphics, etc.

Yes, but this is exactly what a micro benchmark does _not_ try to 
measure.  That's why it is a micro benchmark.  The effects you are 
talking about would be investigated with profiling the real application.

Kind regards

	robert

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web