Showing content from http://mail.python.org/pipermail/python-dev/attachments/20100416/18e73ea6/attachment.html below:
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 16, 2010, at 2:42 PM, Daniel Stutzbach wrote:</div><blockquote type="cite"><div class="gmail_quote"><div><font class="Apple-style-span" color="#000000"><br></font>IIRC, there's a performance hack in dictobject.c that keeps track of whether all of the keys are strings or not. The hack is designed so that lookup operations can call the string compare/hash functions directly if possible, rather than going through the slower PyObject_ functions.<br>
<br>Consequently, validating **kwds should be cheap.<br><br></div></div></blockquote><br></div><div>Good thinking.</div><div><br></div><div>That would definitely be better than scanning the full dict on every call.</div><div><br></div><div><br></div><div>Raymond</div><div><br></div><br></body></html>
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