Hi Mikeal, after some tests/benchmarks on these algorithms with js:

- brute force
- quick seacrh
- boyer moore and tuned boyer moore

I think that could be possible to add a js implementation for 
Buffer.indexOf. The fastest algorithm for small patterns is Boyer-Moore in 
usual cases, but I think the best in terms of memory consumption and data 
rate is QuickSearch.
My js implementations of these algorithms have reached data rate of ~ 20 
Gbit/sec on my cheap laptop, for a short pattern like those for the 
multipart/form-data streams.
You can test some results https://github.com/rootslab/qap and also 
https://github.com/rootslab/bop.
On the other hand, if you have programmed to add better C++ implementation, 
I totally agree.
Any news about that?


Il giorno mercoledì 5 dicembre 2012 02:28:19 UTC+1, Mikeal Rogers ha 
scritto:
>
> we might want to have a conversation about which of these methods should 
> go in to core. some of them can be optimized, eventually, in C and so they 
> should really be in core if we hope to do that eventually. 
>
> On Dec 4, 2012, at December 4, 20125:24 PM, mscdex 
> <[email protected]<javascript:>> 
> wrote: 
>
> > On Dec 4, 3:50 pm, rootslab <[email protected]> wrote: 
> >> A little question: in future releases of nodeJs, is it planned to add a 
> >> method like '*Buffer.indexOf'* ? 
> > 
> > Have you seen buffertools?: 
> https://github.com/bnoordhuis/node-buffertools 
> > 
> > -- 
> > Job Board: http://jobs.nodejs.org/ 
> > Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To post to this group, send email to [email protected]<javascript:> 
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:> 
> > For more options, visit this group at 
> > http://groups.google.com/group/nodejs?hl=en?hl=en 
>
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to