At 12:52 AM +0100 1/3/03, Leopold Toetsch wrote:
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?
Oh, absolutely. One of the joys of a laptop, it's pretty obvious when the hard drive spins up. examples/benchmarks/stress.pasm sort of shows the problem. I managed to wipe an earlier version, but it was allocating arrays of arrays of 10K elements. It starts getting nasty reasonably quickly. I checked in examples/benchmarks/stress3.pasm to show what's going on. Interestingly, it triggers between 1 and 2 sweeps per 10K elements allocated, which is odd as the interpinfo doesn't seem to show that we're actually out of anything. Either the counters are wrong or we're triggering DODs when we're not out of things, but whichever, we need to fix something.

The ever-increasing (by a factor of 4, it looks like) allocation size needs a cap as well--after a certain point, increasing the header allocation size is a bit much.

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 ;-)
Oh, I saw them, and they were pathetic. Much less pathetic now, which is darned good. :)

Still, we can (and have to) do better. I figure it's a good place for someone who's looking to get into the source to fiddle with. It's reasonably small and self-contained.

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 :-)
Check out the stress tests, but not quite that extreme. :)
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to