FlyerTalk Forums - View Single Post - Search Feature needs to allow 3 chars
View Single Post
Old Aug 4, 2007 | 1:12 am
  #8  
RichardInSF
Moderator: Luxury Hotels and FlyerTalk Evangelist
All eyes on you!
20 Years on Site
 
Join Date: Sep 2002
Location: Palo Alto, California,USA
Posts: 18,251
Speaking from a computer-science theoretical point of view, searching for AKL* would not always require materially more CPU cycles than AKL, but even if it does, the difference isn't likely to be huge.

That's because search algorithms have gotten more sophisticated as computer science develops.

To illustrate this, consider a search algorithm which takes the approach that until it finds the first letter of the search string, it doesn't look for the rest. Using an algorithm like that, an AKL and AKL* search would take virtually the same number of CPU cycles.

Such an algorithm may even be optimal on those CPUs which have a hardware instruction that does a very rapid one character comparison.

Algorithm design for search can actually get pretty interesting if you are into that sort of thing!
RichardInSF is offline