Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Heap structure for lookup?

by ohcamacj (Beadle)
on May 27, 2015 at 21:04 UTC ( [id://1128072]=note: print w/replies, xml ) Need Help??


in reply to Heap structure for lookup?

Judy arrays sounded cool. It's a somewhat hideously complex tree data type that uses multiple types of branch nodes to achieve memory compression.

Replies are listed 'Best First'.
Re^2: Heap structure for lookup?
by BrowserUk (Patriarch) on May 27, 2015 at 22:54 UTC

    Yes. I've played with those for a different project quite recently.

    What I discovered was that work really well if they can keep their data structures in L1 cache.

    But using them from Perl code inevitably means using perl's hashes (all of Perl's namespaces (packages) are based around hashes), and they by their very nature exhibit very poor locality of reference and thus mess with the caches, with the result that the performance of Judy arrays drops away significantly.

    Also, they are as you mention, horribly complicated beasts which is fine until something goes wrong, and then you're up Sneak Creek without a paddle.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-24 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found