On Wed, 26 Nov 2008 17:12:40 +0100, Sigfried <>
wrote, quoted or indirectly quoted someone who said :
>I need to do some lookup on a set of strings with associated data. I've
>tried HashMap and TreeMap (wich are slower).
>
>I'd like to get more performance, so i've read about Ternary Search Tree
>which are supposed to be equally fast with hashmap on successful searchs.
>
>So is there faster than that ? I mean at least 30 % faster than HashMap
>? Is there a digital search tree java implementation (with benchmark?)
>around ? I didn't find any on google.
For HashMap to work well it needs plenty of breathing room. Increase
the capacity till you find the optimum setting.
HashMap itself has almost no overhead. About the only thing it does is
call hash and chains of collisions. If the capacity is high enough
there won't be many collisions.
Think about tuning hash -- caching, computing a faster way...
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Humanity is conducting an unintended, uncontrolled, globally pervasive experiment
whose ultimate consequences could be second only to global nuclear war."
~ Environment Canada (The Canadian equivalent of the EPA on global warming)