POV-Ray : Newsgroups : povray.off-topic : Nice data structure : Re: Nice data structure Server Time
5 Sep 2024 21:27:13 EDT (-0400)
  Re: Nice data structure  
From: Orchid XP v8
Date: 22 Jun 2009 14:26:03
Message: <4a3fccbb$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.