In comp.lang.javascript message <ep***********@news2.ipartners.pl>, Sat,
27 Jan 2007 14:23:31, =?iso-8859-2?Q?Sebastian_=AFelazny?= <ze***@op.pl>
posted:
>I have problem, becose my function searching a very big file
...
What can I do?
Ensure that your search function is as efficient as possible.
for (J=0 ; J<VBF.length ; J++)
if (VBF.substr(J, Find.length) == Find) break ;
is about as inefficient as I can readily think of.
Boyer-Moore and Boyer–Moore–Horspool (Wiki) are efficient.
It's a good idea to read the newsgroup and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.