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/2002-December/031104.html below:

[Python-Dev] Possible low-hanging optimization

[Python-Dev] Possible low-hanging optimization [Python-Dev] Possible low-hanging optimizationKevin Jacobs jacobs@penguin.theopalgroup.com
Thu, 12 Dec 2002 13:06:17 -0500 (EST)
On Thu, 12 Dec 2002, David Abrahams wrote:
> In Boost.Python, extension class instance dictionaries are created
> only on-demand.  It's an obvious win for lots of wrapped C++ class
> instances, which will never have Python attributes tacked on.  This
> also seems like a potential big win for some kinds of Python
> instances, like those which use __slots__ but may also have a
> dictionary (IIRC that is a possible configuration).

I am fairly confident that CPython doesn't allocate instance dictionaries
until they are needed.  At one point I verified this, though my brain and
the code has likely diverged much since there.

-Kevin

--
Kevin Jacobs
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19         E-mail: jacobs@theopalgroup.com
Fax:   (216) 986-0714              WWW:    http://www.theopalgroup.com




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