I would be surprised (though I haven't benchmarked) if a pure-Perl implementation of Boyer-Moore would beat Perl's native index.
I have. It's not even in the same eon.
And, whilst I won't dare to suggest my Inline::C implementation was perfect, even in C it didn't come close to beating index. The overhead of transitioning from Perl through Inline to C and back, wiped out any gains.
In reply to Re^2: Boyer Moore algorithm
by BrowserUk
in thread Boyer Moore algorithm
by kranthikumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |