Automatic Generation of Python Class Files
fuzzyman at gmail.com
Tue Oct 30 11:52:11 CET 2007
On Oct 29, 11:35 pm, Steven Bethard <steven.beth... at gmail.com> wrote:
> Fuzzyman wrote:
> > On Oct 22, 6:43 pm, Steven Bethard <steven.beth... at gmail.com> wrote:
> >> # Inherit from object. There's no reason to create old-style classes.
> > We recently had to change an object pipeline from new style classes to
> > old style. A lot of these objects were being created and the *extra
> > overhead* of new style classes was killing us. :-)
> I'm curious. Was it memory or speed overhead that was the problem?
It was speed overhead - I have to add a disclaimer that this is
IronPython, but my understanding is that the situation is similar with
CPython. Creating new style class instances is slower than for old
This was in the execution of spreadsheets, where we had a pipeline of
three objects for each spreadsheet element (not sure if the
implementation is still the same now).
More information about the Python-list