I have with me, presently a working implementation of Boyer Moore.
However, the only problem is that the lookup using hash_map is very
slow, since it needs to be done at every stage. If I use std::map,
it's even slower. However, while testing with strings(char arrays), I
tried using a static array of 256 entries(one for each char), and that
made whole process faster by about 70%, which is a LOT!!!! So, I'm
contemplating providing specialization for char, unsigned char, and
string for which this algo will probably be used the most, and have
that implementation use the array logic, while the other
implementations can use __gnu_cxx::hash_map<>. Again, I hope no one
uses this algo for anything other than string searching, else they
will be in for a big performance hit.