Hi Ben,

On Thu, Sep 22, 2005 at 12:47:14PM +0100, [EMAIL PROTECTED] wrote:
> Current checkout, compiled pypy (windows as usual):
> -> Segfault

Grumble.  We're still trying to reproduce the problem...

> On another point, I notice that when lists of pointers are resized lots of 
> incref/decrefs happen when all that really needs to happen is a move 
> operation (or even a memcpy of the whole block)? Also, could all lists of 
> pointers share the same c representation, with casts from void*?

Yes, there are obvious inefficiencies here.  We probably don't care too
much about reference counting in the immediate future, as producing a
version of PyPy using the Boehm garbage collector produces code that is
both much shorter and much faster.

At some point, however, we will need indeed to come back to this problem
and figure out good algorithms that can detect and remove the majority
of these wasted incref/decrefs.  For example, a lot of references can be
"borrowed" from the caller or from another object, or even "stealed"
away from the caller or another object.  If we can find good enough
algorithms, the case of list resizing would be solved by finding out
that we can steal the references from the old list.  I think it would be
a better approach than special-casing list resizing with some kind of
memory-move operation.


A bientot,

Armin.
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to