is_pmc_ptr

Nicholas Clark nick at ccl4.org
Sun Sep 4 09:18:37 UTC 2011


On Sun, Sep 04, 2011 at 01:06:47AM +0200, Jonathan Worthington wrote:

> One obvious fix would be to just keep an extent list: an array of 
> (start,end) pairs, hanging off the pool header, which we can very 
> cheaply scan through (since it's just a bunch of values laid out 
> contiguously in memory). That way, we don't go chasing all over RAM, and 

I think you can binary search it, as it's effectively an inversion list.
O(log n) will beat O(n) for any non-trivial size :-)


Nicholas Clark


More information about the parrot-dev mailing list