Rapleaf/jack — pull request #37 by scarr2508 (2011-11-09 04:40:33+00:00)
Title: cache ModelWithId.hashCode()

cache ModelWithId.hashCode() result to reduce creation of new objects and lessen the work GC needs to do

What do you guys think of this? The other approach I can think of is to optimize hashCode() so it doesn't create as many objects but that will never be as optimized as this much simpler change.

To give perspective, after gender inference (which is being optimized) this one call is the most GC intensive thing we do in the PzApi.