On Tue, 24 Sep 2002, Leopold Toetsch wrote:
> intlist_3.pbc is with 1) already 10 times faster then the same test with
> PerlArray (ok, that's not fair, .PerlArray has to new_pmc, which
> accounts for ~40% difference).

What happens if you presize the PerlArray to its final size before the
loop?  i.e. "set P0, 1000" or whatever.  IIRC PerlArray extends by a
single element each time you add an element off the end.  This seems like
an implementation wart to me, but fixing it takes a bit of doing, since
PerlArray doesn't have a place to store an "allocated size" as well as a
"real size".

/s

Reply via email to