From: georgesawyer Date: 2005-01-13T14:31:16+09:00 Subject: Re: brute force string search Martin Pirker Jan 12, 2005 at 10:28 PM wrote: >what useful comments come back :-) Thanks! >possible to do some presorting of the data ... Cutting the search from 100% of a String to specific 1% ... 64 K (number of) sections gave 0.0015 %, but if it cannot be done, too bad ... >How to do that? ... search 1Mb in the middle of a 100Mb String i need a String#yetanotherindex( "xyz" ,startoffset ,endoffset), otherwise performance sucks again. I RFC adding an index function to String which accepts 3 parameters: (searchitem, startoffset, endoffset) One can make in advance an array (even if not 64 thousand element-) of 512-byte strings, sidestepping the need this time. With warm regard,