3 ms·
It is kind of a dumb test to do 'new HashMap' with the default initialCapacity then cram stuff into it in a tight loop. It is basically testing constant rehash
by cfieber 14y ago
It is kind of a dumb test to do 'new HashMap' with the default initialCapacity then cram stuff into it in a tight loop.
It is basically testing constant rehashes which is obviously going to generate a ton of garbage
I suspect the default collection implementations would perform significantly better if they were used correctly
- zorked 14y agoThey still suck even if you set a large initialCapacity.