Re: zope.interface memory optimization

"Charlie Clark" <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Organization Clark Consulting & Research
Message-ID <[email protected]>
Am 08.11.2010, 15:35 Uhr, schrieb Brian Sutherland  
<[email protected]>:

> If no-one replies, I'll assume that 3% is just not enough to be
> interesting and do nothing;)

Hi Brian,

thanks for sharing this but it looks to me like a micro-optimisation that  
isn't really worth going against best practice for - by using explicit  
name-mangling.

-        return self.__tagged_values.get(tag, default)
+        return getattr(self, '_Element__tagged_values', {}).get(tag,  
default)

Any improvements higher up the stack (using slots, different Python  
version or compilers like LLVM) are likely to have a more significant  
effect. Might be worth timing a slots-based implementation.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.