No such thing as a small change | |
PerlMonks |
Fast Sets of Scalars in Perlby Anonymous Monk |
on Jan 07, 2008 at 15:38 UTC ( [id://660851]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I saw the implementation of Set:Light on CPAN:
Set::Light I think this is a neat idea to save memory. I was wondering if I could do the same thing by simply using exists/undef. To test membership: To set membership:
To remove an item, the delete command must be used. I imagine that all undef values are the same, so no extra memory is wasted. Could someone shed some light on this analysis?
Back to
Seekers of Perl Wisdom
|
|