[Zope3-dev] Re: [Zope3-checkins]
SVN: Zope3/branches/tlotze/src/zope/interface/interface.py
Simplifying some idioms, coding style.
Benji York
benji at zope.com
Tue Aug 23 08:36:22 EDT 2005
Thomas Lotze wrote:
> On Mon, 22 Aug 2005 11:18:44 -0400, Benji York wrote:
>>I didn't review your entire check in (and I realize that this is on a
>>branch), but the non-use of setdefault there was probably intentional to
>>keep from constructing empty dicts and lists when they may not be used.
>
> A simple timing test suggests that using setdefault is actually faster,
> the construction of empty dicts and objects notwithstanding.
Great! I didn't mean to suggest it wasn't; I just wanted to point out
the (possible) intent of the original coder. Perhaps they should have
benchmarked it (like you did) instead of doing something they thought
should be faster (premature optimization and all that).
> ACK
I assume this means "acknowledged" as opposed to "an exclamation of
surprised disgust".
--
Benji York
Senior Software Engineer
Zope Corporation
More information about the Zope3-dev
mailing list