in reply to Re: Techniques On Saving Memory
in thread Techniques On Saving Memory

you also need to store unsmashed copies of the references so that perl will not GC the elements to which you are storing smashed refs

Ooo, ouch. Good point.

I think you will find, case after case, that by the time you're done "improving" a perl feature, you're going to have a solution that is as complex (in memory and time and code and shortcomings) as the perl implementation itself.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^3: Techniques On Saving Memory
by BrowserUk (Patriarch) on Mar 09, 2005 at 19:38 UTC

    I've been trying to get this idea right for almost two years now. On two occasions I've even reached the point where I thought I was ready to let code loose on the world, but then I discovered something which I wasn't able to handle without duplicating the references in a hash, which completely negates any benefit at all.

    As I said, I have the germ of a solution, but as I am entirely uncomfortable in using XS, or even XS modules in ways that move beyond their authors intent, it will remain just an idea until I can think of a way of proving it's safety.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.