|
|
Warp wrote:
> Invisible <voi### [at] devnull> wrote:
>> As far as I can tell, it's only the letter selection part of the tree
>> which can be unbalanced. E.g., if you have a million strings, you won't
>> ever have to do a million comparisons to find a given string. You might
>> end up doing 25 comparisons per character or something, but you'll never
>> need to do a million.
>
> But if the strings themselves are very long, then it can make a
> significant difference whether you have to make 25 comparisons per
> character or 5.
Sure. I'm just saying, if the number of comparisons were dependent on
the number of keys, you'd be in a whole other *complexity class*. That
puts "really slow" into perspective.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|