[concurrency-interest] ConcurrentSkipListMap performance

Blair Zajac blair at orcaware.com
Mon Oct 24 16:40:56 EDT 2011


On 10/24/2011 01:20 PM, Nathan Reynolds wrote:
> There are a lot of important details going on here but I am not an
> expert. I just know of a few of them. These details make
> microbenchmarking very difficult. I would like to hear of other ideas.
>
> JVM warm-up can be tricky. For example, HotSpot with the -server option
> has 2 optimization passes. The first pass happens at 1,000 invocations
> or iterations of a loop. The second pass happens at 10,000 (default)
> invocations or iterations of a loop. The first pass causes the method(s)
> to be executed as native processor instructions instead of being
> interpreted Java bytecode. This first pass adds profiling code. The
> second pass takes the profiling results and generates a fully optimized
> method or loop. This time there isn't any profiling code and full speed
> is achieved. The optimized code isn't executed until the thread exits
> the loop or method and then re-enters. Note: HotSpot does have an
> optimizer logging feature and can be used to determine if the optimizer
> is finished (i.e. by lack of further output).

For these issues, and running a GC as you mention below, running ones 
benchmark using Google Caliper will take care of a few of them:

http://code.google.com/p/caliper/

Regards,
Blair


More information about the Concurrency-interest mailing list