[Python-Dev] Counting collisions for the win (original) (raw)
Victor Stinner victor.stinner at haypocalc.com
Fri Jan 20 13:08:43 CET 2012
- Previous message: [Python-Dev] Counting collisions for the win
- Next message: [Python-Dev] Counting collisions for the win
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm surprised we haven't seen bug reports about it from users of 64-bit Pythons long ago
A Python dictionary only uses the lower bits of a hash value. If your dictionary has less than 232 items, the dictionary order is exactly the same on 32 and 64 bits system: hash32(str) & mask == hash64(str) & mask for mask <= 232-1.
- Previous message: [Python-Dev] Counting collisions for the win
- Next message: [Python-Dev] Counting collisions for the win
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]