RFR JDK-8011200 (was 7143928) : (coll) Optimize for Empty ArrayList and HashMap

Doug Lea dl at cs.oswego.edu
Wed Apr 10 22:49:01 UTC 2013


On 04/10/13 17:26, Martin Buchholz wrote:
> I'm willing to accept John as an authority on hotspot optimization.
> I'm surprised that null checks aren't more close to free in part because recent
> jsr166 code has been introducing more explicit null checks, sometimes in code
> where the reference being checked is "known" not to be null.
>

Some are cheap. Some aren't. Always measure.

-Doug




More information about the core-libs-dev mailing list