This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients Arfrever, christian.heimes, georg.brandl, loewis, mark.dickinson, meador.inge, ncoghlan, pitrou, python-dev, skrah, vstinner
Date 2012-08-29.15:23:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1346253787.31.0.656002715342.issue15573@psf.upfronthosting.co.za>
In-reply-to
Content
I'm trying to think of an optimization for the native types. It should 
be possible to cast any native type element to unsigned char and use the
truncated value for the bytes hash.

Well, for double probably it's required to go from double -> int64_t ->
unsigned char, otherwise the first cast is technically undefined for 
negative values, though it works with gcc.


For non-native types and compound types, Nick's suggestion of
hashing the shape and a couple of values seems to be the best
solution.


Should we do anything about this before 3.3.0?
History
Date User Action Args
2012-08-29 15:23:07skrahsetrecipients: + skrah, loewis, georg.brandl, mark.dickinson, ncoghlan, pitrou, vstinner, christian.heimes, Arfrever, meador.inge, python-dev
2012-08-29 15:23:07skrahsetmessageid: <1346253787.31.0.656002715342.issue15573@psf.upfronthosting.co.za>
2012-08-29 15:23:06skrahlinkissue15573 messages
2012-08-29 15:23:06skrahcreate