I just wrote up the binarytrees test in pir, based on the c version. Although I haven't waited more than twenty minutes yet, I can't get it working with the argument being 16(what they test with) beyond printing the first line. The results I'm getting, it's slow, and I don't have enough ram. Right now, on FreeBSD, it's taking up over 280 megs of memory, varying between 50 and 80 megs resident. And apparently something in the jit core with FreeBSD 5.4 is broken... Something with the integers...

Anyway, I've attached the file in case anyone else has better luck. I'm using parrot r10431 at the moment on OS X, and 0.3.1 on FreeBSD. For smaller numbers, it's usable. With twelve, I get around 30 seconds to a minute for both versions/archs. From my rough numbers of it, it should only take about about 15 minutes, but the memory constraint slows it down for me.

I notice that a lot of the code pertains to lines 42-47, creating an array and storing values in it. But by far, the biggest part of the execution is tied in calling subroutines and returning. With an argument of 8, invokecc(and it's ilk) are called 100701 times. Either there's a problem with the code that I'm not aware of, or you have a great new test for debugging the gc...

Attachment: binarytrees.pir
Description: Binary data

Reply via email to