in reply to Re^7: Why Boyer-Moore, Horspool, alpha-skip et.al don't work for bit strings. (And is there an alternative that does?)
in thread Why Boyer-Moore, Horspool, alpha-skip et.al don't work for bit strings. (And is there an alternative that does?)
You did say that already didn't you. Sorry for having to be spoon-fed.
The upshot is an algorithm I understand; seems to work; and I can implement. Thank you.
I have certain fears that it won't yield huge saving, because with a modest needle size of 1024 (my needles can be several million bits), you get 1024 - 8 + 1 8-bit patterns, thus an average of 4 candidates per pattern. With the maximum shift very unlikely, and using the minimum of the (ave.) four possibles for each pattern, the shifts are likely to be very modest I think.
Which I guess means, increase the size of the table. 1024 - 16 +1 / 65536 = 0.0153961181640625 per pattern. Should yield better results; at the penalty of a larger table and greater competition for cache.
|
|---|