Comment

Comment by nimrody

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.

parent nimrody 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton