> Elapsed times for 'time parrot hanoi.pbc 14 > /dev/null' are:
> CVS: 52.81, 52.05, 52.33
> CVS + grey COW: 51.53, 52.06, 51.67
> CVS + Mike's COW: 44.31, 44.48, 44.55
> CVS + grey1: 35.89, 36.48, 36.60 (+COW +cyclecount -stackwalk)
> End June grey: 30.14, 29.35, 29.53
>
> And 5000 generations of life tested again:
> CVS: 170.22, 169.01, 168.70
> CVS + grey COW: 162.65, 161.44, 163.61
> CVS + Mike's COW: 156.86, 157.78, 157.67
> CVS + grey1: 80.38, 80.74, 80.69
> End June grey: 59.21, 59.41, 59.42
> CVS 14th July: 81.22, 81.17 (last timings I recorded before stack walking)
>
> So I get an improvement on Hanoi of about 15% using your
> COW patch, and your COW is better on both tests than mine.

Wow, that's cool, if strange. COW+Hanoi was definitely slower for me.

I have another interesting test to try.
Run languages/basic/basic.pl.
Type "LOAD WUMPUS, and hit return.
Type "RUN", and hit return.
Type "N" and hit return.
It then builds a wumpus maze and does other intensive stuff in the basic
interpreter.

The patch I sent out runs 4x slower than CVS on the above test. It has a
peak memory usage of 22MB, versus straight CVS's 2MB, and your
parrot-grey's usage of 6MB. (I didn't compare parroy-grey speed because it
wouldn't be fair. ;)

My current theory is that it is due to its conservative increase of
reclaimable (only if it's guaranteed to be reclaimable), versus grey's
always-increment-reclaimable. Technically, mine is correct, since in
theory you could make a bunch of COW strings, free them all, have
reclaimable be quite large, and have the total_size calculation in
resources.c come out negative. :)

One idea I had was that because I don't have an accurate reclaimable
figure, the asymptotic behavior of the collection pool size was growing
each collection due to the under-estimating of reclaimable.  Changing this
to use a non-increasing number calculated from the pool's free space,
brought my usage down to 6MB, closer, but not nearly there.

In addition, my COW code was getting roughly 4x slower times after I hit
"N". I'm assuming it's related to the memory usage. I was able to get it
down to 1.5x the striaght CVS code when I dropped the memory usgae, and
I'd like to hope we could make it drop even further by fixing this memory
leak.

The fact that both COW's require roughly 3x *more* memory is quite
surprising. If you (or anyone else) feels like attempting to figure out
where our memory is going, I would greatly appreciate it. I'm stumped over
here, and am getting frustrated. (That's why I'm writing this email and
going to sleep ;)


Thanks,
Mike Lambert

Reply via email to