Author leouserz
Date 2006-12-22.19:54:40
SpamBayes Score
Marked as misclassified
hmm, I was thinking about having a PyString cache.  Instead of calling new PyString("STRING OF SOMETHING") pass the call off to a factory method and have it return a cached PyString.  I was under the impression yesterday that PyStringMap was getting PyStrings anyway and that they were passing on their Strings.  So Im not sure how switching to PyDictionary is going to add any costs in this regard.

Yes, hashCode should be faster than System.identityHashCode().  Native methods add overhead that you won't ever see with a simple accessor method.  String just returns a newly calculated hashCode or a cached one.

The performance difference I saw yesterday may not even be centered around the difference between identityHashCode and hashCode, it may just be that the HashMap is more efficient in how it stores and retrieves things than PyStringMap.

Date User Action Args
2008-02-20 17:17:21adminlinkissue1152612 messages
2008-02-20 17:17:21admincreate