[Python-Dev] Possible low-hanging optimization

Michael Hudson mwh@python.net
13 Dec 2002 10:33:13 +0000


David Abrahams <dave@boost-consulting.com> writes:

> Skip Montanaro <skip@pobox.com> writes:
> 
> >     Guido> For classic classes, it would be too much of a break with
> >     Guido> history.
> >
> > In addition, since most classes exist to associate state with methods that
> > operate on it you'd probably only be delaying the creation of self.__dict__
> > by a few milliseconds in the common case.
> 
> That's why I mentioned that it might help for new-style classes with
> __slots__.

And why everyone seems to think we do it already in that case but
isn't quite sure :)  (I'm in that camp too).

Cheers,
M.

-- 
  Just point your web browser at http://www.python.org/search/ and
  look for "program", "doesn't", "work", or "my". Whenever you find
  someone else whose program didn't work, don't do what they
  did. Repeat as needed.    -- Tim Peters, on python-help, 16 Jun 1998