On 05/23/2016 03:11 PM, qznc wrote:
Actually, std find should be faster, since it could use the Boyer Moore
algorithm instead of naive string matching.

Conventional wisdom has it that find() is brute force and that's that, but probably it's time to destroy. Selectively using advanced searching algorithms for the appropriate inputs is very DbI-ish.

There are a few nice precedents of blend algorithms, see e.g. http://effbot.org/zone/stringlib.htm.

Writing a generic subsequence search blend algorithm, one that chooses the right algorithm based on a combination of static and dynamic decisions, is quite a fun and challenging project. Who wanna?


Andrei

Reply via email to