My gut feeling on this one is that brute force is the only way, _but_ processors are really good at bit-ops so it should be possible to do well.
However I think that to do it efficiently you'll need to get closer to the processor then the high level languages will allow, so you will have to write it in assembler. On x86 there are the MMX instructions that let you operate on 64 bits at a time, which might help.
Another thought: GPUs must be really good at shifting bits strings and doing bit-ops, so maybe some smart code running on your graphics card will do the job :). I'm thinking about opengl / cuda etc. But as I have other things to do today, I trying desperately NOT to fall down that rabbit hole right now! When I get time I'll have a read around the subject, it sounds really interesting.
In reply to Re: Why Boyer-Moore, Horspool, alpha-skip et.al don't work for bit strings. (And is there an alternative that does?)
by RichardK
in thread Why Boyer-Moore, Horspool, alpha-skip et.al don't work for bit strings. (And is there an alternative that does?)
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |