A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-July/067159.html below:

[Python-Dev] exception too expensive?

[Python-Dev] exception too expensive? [Python-Dev] exception too expensive?Raymond Hettinger raymond.hettinger at verizon.net
Sat Jul 8 23:37:38 CEST 2006
> 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

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4