Nicholas Clark <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 05, 2003 at 09:34:04AM -0400, Dan Sugalski wrote:
>> On Fri, 5 Sep 2003, Peter Haworth wrote:

>> > With the seen hash approach, I wouldn't expect the hash itself to take
>> > nearly as much space as the frozen structure;
>>
>> My experience tracing variable graphs in Perl 5 indicates otherwise.

> I think it may be worth listening to Dan on this one.

I don't know why Storable.xs is using a general HV for mapping an
address to an integer (more isn't needed to serialize all IMHO - Dan's
next_for_GC approach doesn't provide more info). Perl5 does convert the
address to a string and uses all weirdness of hv.c code. This isn't
necessary for this special kind of problem.

Parrot has some DOD counters for possibly active PMCs. A simple and
probably fix-sized[1] hash based on such a count with just a mapping of
{&pmc => id} takes 12 bytes per entry on 32-bit architecures and its
really fast.

[1] no DOD interfernce here: just malloc'ed.

leo

Reply via email to