Dan Sugalski wrote:
First, the resource system falls down hard when doing lots of allocations with no deallocations. It gets exponentially slower, which is a Bad Thing.
Your are sure, that you didn't start swapping?
I have here this test pushing X integers into a PerlArray, then clone it, then do a sweep:
1e5
build 0.181974 seconds.
clone 0.056985 seconds.
sweep 0.082553 seconds.
5e5
build 0.834865 seconds.
clone 0.277557 seconds.
sweep 0.389210 seconds.
1e6 first time
build 1.305464 seconds.
clone 11.202339 seconds.
sweep 30.276119 seconds.
1e6 3rd time
build 1.293441 seconds.
clone 1.267864 seconds.
sweep 0.976740 seconds.
I see a linear increse but obscure decrease for the first 1e6 test where it seems to be that swapping occurs first time (i386/linux, 800 Mhz Athlon, 256 Meg Ram).
Second, Array and its subclasses need some performance thumping, as they seem to come in at about half the speed of perl 5.
Ha, you didn't compare it before my list checkin/array rewrite ;-)
I'll check in the stress programs and their perl 5 counterparts so we can have some sort of feel for time issues on this.When those are in, I'll have a look at it. There are some things in list.c that can be optimized. Did you compare mem usage of:
new P0, .PerlArray
set P0[1000000], 42
with perl5 too :-)
leo