Hi,
I have started to work on some of the missing ops for the Resizable*Array PMCs. I noticed that, unlike the Array and PerlArray PMC, they currently do not use the functionality from src/list.c. This means that a ResizablePMCArray cannot be broken up in chunks and
set P0, .ResizablePMCArray P0[1000] = 1000
causes a lot of memory allocation.
Is there a design reason for not having a chunked implementation?
At this point, I think a chunked implementation is actually significantly sub-optimal. It makes sense for large or sparse arrays. Most of the arrays we'll be dealing with are going to be smallish, and the list stuff is unneeded overhead. The arrays can, if we want to get clever, switch to a chunked representation when things get big enough.
I think I'd rather the resizeable and fixed arrays went with a non-chunked scheme by default, rather than a chunked one. We'd pick up some speed on array access that way in the majority of cases.
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk