> i thought avoiding a second dict lookup should be faster, but it turned out
> to be completely wrong.

Unless you have an expensive hash function, it is almost never worth it to try 
to avoid a second lookup.  Because of memory cache effects, the second lookup 
is 
dirt cheap (a cache miss is about as expensive as a floating point division). 
See dictnotes.txt for a few thoughts on the subject.


Raymond

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to