Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

You probably want a hash.

by schwern (Scribe)
on Jul 23, 2005 at 19:55 UTC ( #477511=note: print w/ replies, xml ) Need Help??


in reply to help! red-black binary tree problem

One of my first perl modules ever was an attempt at a family of binary search tree modules. The few programming classes I took taught a lot about trees and they seemed really neat, especially splay trees which could self-optimize.

I discovered this: The performance stinks. Unless you're dealing with a bazillion records, just use a hash. Even having to sort a hash each time the performance will blow a tree written in Perl out of the water. One of those cases where C is significant in calculating algorithm efficiency.


Comment on You probably want a hash.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-29 01:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls