in reply to Re: A memory efficient hash, trading off speed - does it already exist?
in thread A memory efficient hash, trading off speed - does it already exist?
Indeed I am also considering something similar to this, although I'm not entirely sure if it would work quite as I hope.
The data is constructed like so:
And so on. I think perhaps I could slim down memory considerably by doing something like the following:%hash{Keyword} -> {Symbol_1} = Weighting %hash{Keyword} -> {Symbol_2} = Weighting
And, as Mr_Person has already noted, no I don't intend to use | and , as separators. Already when writing data to the disk as a "brainsave" I use \x255 as a record separator, just like you were thinking. Perhaps the fact that I started programming in BASIC as well might have something to do with our shared mindset? :)%hash{Keyword} = "Symbol_1 | Weighting, Symbol_2 | Weighting"
JP,
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: A memory efficient hash, trading off speed - does it already exist?
by Aristotle (Chancellor) on Feb 06, 2003 at 11:57 UTC | |
by JPaul (Hermit) on Feb 06, 2003 at 17:57 UTC | |
by Aristotle (Chancellor) on Feb 07, 2003 at 12:57 UTC | |
by JPaul (Hermit) on Feb 07, 2003 at 16:01 UTC | |
by Aristotle (Chancellor) on Feb 07, 2003 at 20:29 UTC |
In Section
Seekers of Perl Wisdom