Dan Sugalski wrote:
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.
1) parrot compiled -O3 (classes/Makefile is br0ken, doesn't get CFLAGS from Configure) - but unoptimized is still faster then perl5 :-)
2) I did finetune block allocation, which did cause DOD runs too often. Memory blocks are growing too now.
3) Changed growing factor for PMCs from 4 to 1.5 and started with a bigger initial size. Growing too aggressively causes far too many PMCs allocated for programs with many live objects. Also I did introduce some (arbitrary) upper limit for pool size.
>>> Second, Array and its subclasses need some performance thumping, as
>>> they seem to come in at about half the speed of perl 5.
4) classes/perlarray.pmc was totally unoptimized (cut&paste blabla).
$ time parrot stress.pbc
real 0m0.508s
user 0m0.430s
sys 0m0.080s
$ time parrot -j stress.pbc
real 0m0.420s
user 0m0.350s
sys 0m0.070s
$ time perl examples/benchmarks/stress.pl
real 0m0.643s
user 0m0.610s
sys 0m0.030s
But, this is not the original stress.pasm it is a worse one, more similar to the perl version (you were reusing P0 for @arr1 and @arr2, while mine does allocate new arrays leading to more live objects).
perl: 5.8.0 -Duselongdouble (which shouldn't matter here)
i386/linux, athlon 800, 256 Meg
I'll comment the changes a little bit more and
[ ] send patch
[ ] check it in?
leo