cwi-swat/pdb.values — pull request #52 by basten (2014-12-09 16:37:05+00:00)
Title: Made hashCode lazy for List and Constructors

After some performance analysis (together with @DavyLandman) of a program I'm writing we found big slowdowns caused by List that would always calculate the hashCode on construction, and Constructors that would always recalculate their hash.

For List we made the cached hashCode lazy, and for Constructor we added the cache and made it lazy.

The only downside we see is memory usage. Constructors now have two new fields (int and boolean) and List have an extra boolean field.

So, @msteindorfer and @jurgenvinju what do you think? For my program it made a BIG impact.