Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: optimsed HashMap Date: Sun, 25 Nov 2012 15:30:42 +0100 Lines: 31 Message-ID: References: <8i70b8d0pm6ibk03ti4t2pv60jd0bctlcs@4ax.com> <5Yidnbg3DrTK2S3NnZ2dnUVZ_uudnZ2d@earthlink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net aOyduRiOfEHzRVT1mcUaywd8SkhtD7x3SC4cHMTKNT3ullxmSRocWnWmdJ+7yg1Kw= Cancel-Lock: sha1:HN+D4ThKfU3W0aYzPDulirfiEgk= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:19942 On 25.11.2012 14:50, Chris Uppal wrote: > Robert Klemme wrote: > Alternatively, use a real DFA matcher which will do all of that work for you as > it creates a minimal (or maybe only nearly mininal) DFA. Right, that's probably an even better option. :-) >> Not sure though whether it is dramatically faster or slower than a standard >> string search like Boyer-Moore - probably not. > > As I mentioned elsewhere BM is no longer considered the best (there's a nice, > albeit somewhat specialised, book by Navarro and Raffinot "Flexible Pattern > Matching in Strings"). Thank you for that pointer, Chris! > But my gut feeling (another way of saying that I > haven't bothered to test it) is that IO would probably dominate the exection > time whatever algorithm was used (assuming it wasn't implemented > inefficiently). Yes, that seems likely. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/