Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: memory-efficient hash kind for incremental sort

by JavaFan (Canon)
on Jan 07, 2009 at 01:30 UTC ( #734538=note: print w/replies, xml ) Need Help??


in reply to memory-efficient hash kind for incremental sort

You want a 'trie' datastructure - a well known datastructure from the literature. The Perl regexp engine uses one (in C).

I'm not aware of a canned CPAN solution, but tries are a pretty simple datastructure.

  • Comment on Re: memory-efficient hash kind for incremental sort

Replies are listed 'Best First'.
Re^2: memory-efficient hash kind for incremental sort
by grinder (Bishop) on Jan 07, 2009 at 11:56 UTC

    A good CPAN solution that I've played with in the past is Tree::Trie. I would discard Data::Trie as it doesn't do prefix lookups.

    There's also Text::Trie written by the illustrious ILYAZ. While I find it's good for seriously complex problems, it doesn't make the simple things easy. Lots of make-work code to set up all the necessary callbacks.

    • another intruder with the mooring in the heart of the Perl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://734538]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2018-12-19 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (85 votes). Check out past polls.

    Notices?