top | item 43881352

(no title)

nimrody | 10 months ago

No. String.hashCode() was already memoized. So after the first call to hashCode(), future calls just retrieved the data from the hash field of the string object.

This optimization is about avoiding even calling the method because the jvm knows that the value returned will be the same.

discuss

order

No comments yet.