[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-optimize
Subject:    Re: comments on KDE performance tips
From:       Maksim Orlovich <mo002j () mail ! rochester ! edu>
Date:       2003-01-17 17:00:54
[Download RAW message or body]

> Do you still remember pre KDE 2.0 times ?
> At this time there was a *slow* data structure used (was it a simple list ?), 
> and changing it to a tree improved the performance dramatically.
> 
> But of course string comparisons aren't the fastest thing in the world. But 
> I'm afraid there is no way around it.

Sure there is, more than one.

a. Use a hashtable - they do a single comparison, or a constant number of
comparisons, not a logarithmic one, and no re-balancing (which takes
time). 

b. Use hashes of key strings within the red-black tree context for
first-try comparisons, only resorting to string comparisons in case of  a
tie (doesn't kjs use a technique like that?)



_______________________________________________
Kde-optimize mailing list
Kde-optimize@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-optimize
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic