Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10824

Re: Fast String search algorithm

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.netfront.net!not-for-mail
From Wanja Gayk <brixomatic@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Re: Fast String search algorithm
Date Sat, 17 Dec 2011 16:15:59 +0100
Organization Netfront http://www.netfront.net/
Lines 21
Message-ID <MPG.2956d080b7b7c0c69896d9@202.177.16.121> (permalink)
References <i02ne7ptvvl8ofv9uracdu2jm3oq61v2h3@4ax.com>
NNTP-Posting-Host 93.130.5.28
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding 7bit
X-Trace adenine.netfront.net 1324134960 53136 93.130.5.28 (17 Dec 2011 15:16:00 GMT)
X-Complaints-To news@netfront.net
NNTP-Posting-Date Sat, 17 Dec 2011 15:16:00 +0000 (UTC)
User-Agent MicroPlanet-Gravity/3.0.4
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10824

Show key headers only | View raw


In article <i02ne7ptvvl8ofv9uracdu2jm3oq61v2h3@4ax.com>, 
see_website@mindprod.com.invalid says...
 
> Let's say I had a million records each with a text field.  I wanted to
> find all records that contained a given substring.  Are there fast
> algorithms to do that or do you have to scan the whole thing linearly?

To match strings there is the Boyer-Moore-Horspool-matcher and the 
Knuth-Morris-Pratt matcher. I'd try both on real data and see which one 
performs better in this case.

Kind regards,
Wanja

-- 
..Alesi's problem was that the back of the car was jumping up and down 
dangerously - and I can assure you from having been teammate to 
Jean Alesi and knowing what kind of cars that he can pull up with, 
when Jean Alesi says that a car is dangerous - it is. [Jonathan Palmer]

--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Fast String search algorithm Roedy Green <see_website@mindprod.com.invalid> - 2011-12-16 10:08 -0800
  Re: Fast String search algorithm Tom Anderson <twic@urchin.earth.li> - 2011-12-16 18:58 +0000
    Re: Fast String search algorithm markspace <-@.> - 2011-12-17 09:26 -0800
      Re: Fast String search algorithm Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-12-17 21:07 -0800
  Re: Fast String search algorithm Tassilo Horn <tassilo@member.fsf.org> - 2011-12-16 20:07 +0100
    Re: Fast String search algorithm Roedy Green <see_website@mindprod.com.invalid> - 2011-12-16 13:32 -0800
  Re: Fast String search algorithm Gene Wirchenko <genew@ocis.net> - 2011-12-16 12:12 -0800
    Re: Fast String search algorithm glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-12-16 21:22 +0000
  Re: Fast String search algorithm Arne Vajhøj <arne@vajhoej.dk> - 2011-12-16 22:20 -0500
    Re: Fast String search algorithm Lew <lewbloch@gmail.com> - 2011-12-16 21:39 -0800
  Re: Fast String search algorithm Wanja Gayk <brixomatic@yahoo.com> - 2011-12-17 16:15 +0100
  Re: Fast String search algorithm Travers Naran <tnaran@gmail.com> - 2011-12-18 09:17 -0800

csiph-web