> From: Antoine Pitrou <[email protected]>
> <raymond.hettinger <at> gmail.com> writes:
> >
> > AFAICT, the performance of the proposal:
> >
> > * increases space requirements by a small fixed
> amount
>
> Well, given my proposal (assuming it turns out ok) it
> doesn't.
>
> > * s.append() performance slightly degraded.
>
> Why?
>
A slight degradation is unavoidable AFAICT. The overhead is roughly this on
every call:
if (self->orphans >= newsize) { // SKIP ALMOST ALWAYS
needed = newsize + self->orphans;
And if it's time for a realloc, you have to pay down a little more bookkeeping:
items = self->ob_item - self->orphans;
self->ob_item = items + self->orphans;
op->orphans = 0;
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com