[Shootout-list] better python implementation for hashtable-update

Antoine antoine at pitrou.net
Sun Apr 23 22:56:27 UTC 2006


Here is an improved Python implementation of hashtable-update.
Two improvements:
- all critical code must be put in a function ; otherwiser the local
variable optimization by the python interpreter does not work
- iterator versions of common functions are often a bit faster (in this
case iterkeys() instead of keys())

Regards

Antoine.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hash2.py
Type: application/x-python
Size: 392 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/shootout-list/attachments/20060423/bb3863f7/hash2.bin


More information about the Shootout-list mailing list