Commit a18dd7b7 authored by Karl Skomski's avatar Karl Skomski Committed by James M Snell
Browse files

src: replace naive search in Buffer::IndexOf



Adds the string search implementation from v8
which uses naive search if pattern length < 8
or to a specific badness then uses Boyer-Moore-Horspool

Added benchmark shows the expected improvements
Added option to use ucs2 encoding with Buffer::IndexOf

Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2539
parent aeee956a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment