[concurrency-interest] ConcurrentHashMap bulk parallel operations
forax at univ-mlv.fr
Tue Aug 14 10:42:55 EDT 2012
On 08/14/2012 04:11 PM, Doug Lea wrote:
> On 08/14/12 09:59, Tim Peierls wrote:
>> On Tue, Aug 14, 2012 at 9:44 AM, Doug Lea <dl at cs.oswego.edu
>> <mailto:dl at cs.oswego.edu>> wrote:
>> * While preliminary performance checks are promising, beware that
>> the very first parallel task execution time can be terrible.
>> Really terrible. A lot of code needs compiling, threads
>> need to be constructed, memory needs to be reserved, etc,
>> to get going. Hopefully some of this will improve.
>> First for the JVM? for the CHM classloader? for the CHM instance?
> The worst case is for "All of the above". Others generally less so.
> Here's an example run of an in-progress test program that just
> computes sums in different ways in a CHM with about 10M elements:
> time: 1.331
> First parallel run:
> time: 8.189
> Next few runs:
> time: 0.064
> time: 0.064
> time: 0.047
> time: 0.044
> (stays around the same time from there)
> Now switch to a different (more expensive) sum function:
> time: 1.214
> time: 0.080
> time: 0.075
Doug, can you do the same test but instead of switching to a more
expensive sum function,
just switch to the same function but declared in an other inner class,
and then switch again
to the same function declared in a third inner class.
More information about the Concurrency-interest