On Tuesday 01 December 2009 at 12:03, Andrew Whitworth wrote:

> On Tue, Dec 1, 2009 at 1:22 PM, chromatic <[email protected]> wrote:

> > I don't believe it's the cost of those data structures created for NQP.  I
> > believe instead it's the cost of the data structures created for PCC.

> Is there any way we can verify this presumption?

Profile NQP-rx on Actions.pm with Callgrind and look at the callees of pmc_new. 
 
Of 4,780,813 PMCs created, the top 10 are:

*       916,675 Context
*       890,230 CallSignature
*       879,236 RetContinuation
*       851,059 CallSignatureReturns
        313,394 String
        249,716 ResizablePMCArray
*       208,173 FixedIntegerArray
        187,444 Integer
        109,101 Hash

Half of the ten are directly part of PCC.  They combine to represent 3,745,373 
PMCs -- 78.34% of all PMCs created.  (I suspect that a lot of those String 
PMCs autobox S registers for slurpy parameters -- which go into the RPAs as 
well).

If ~80% of all PMCs created in the system are only there to account for 
internal data structures for calling functions (and they are), and if there's 
no complex control flow such as continuations and coroutines which necessitate 
keeping sub-graphs of the call graph alive (and in this benchmark, there 
aren't), then I'm very confident that PCC is expensive here.

> Instead of increased
> GC pressure caused by PCC, I am starting to suspect that our mark
> implementation is more inefficient then I previously had thought. I'm
> going to take a look around to see what I can find.

That's probably also true.

-- c
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to