In .NET, String.GetHashCode computes the hash code every time the function is called. This is slightly surprising given that Strings are immutable, and thus could easily compute the hash code on construct or on the first call to GetHashCode (although both of those options do have associated overhead).
Someone I know believes that Java is the same way.
Search This Blog
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment