JMH slides from Portland Java User Group
trask.stalnaker at gmail.com
Thu Feb 12 10:22:21 UTC 2015
On Wed, Feb 11, 2015 at 11:17 AM, Aleksey Shipilev <
aleksey.shipilev at oracle.com> wrote:
> * I wish people stop using explicit Blackhole when an implicit return
> is cleaner. Explicit Blackhole is only needed when you have multiple
> values to consume, and you can't/won't return the wrapper.
I removed the Blackhole example as it seems uncommon in my limited
experience to need to consume multiple values (and one less slide is not a
bad thing). Btw, I bet if Blackhole didn't have such a great and memorable
name, people wouldn't use it so much ;).
* @Group is about asymmetric benchmarks, not multithreading benchmarks
> per se. You can run the symmetric multithreaded benchmarks without
> @Group, just by adding the threads.
I hadn't realized you could run multithreaded benchmarks without @Group,
thanks. I added @GroupThreads to the example since I think asymmetric
benchmarks are a nice feature to highlight.
* Nice observation about "private final int x" and constant folding, we
> should do that in samples. In fact, contributions to the sample code and
> language are appreciated.
Eclipse has a save action that will automatically add final to private
fields where possible so this one has bit me :).
Thank you for your comments.
More information about the jmh-dev