in reply to Re^3: 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?)
How about making the bits pretend to be bytes?
Apart from the fact that a 1GB binary bitstring that fits comfortably in memory would suddenly occupy 8GB and push my machine into swapping; what makes you think searching 8GB of ascii-ized binary would be faster than searching 1GB of binary binary?
Okay, so you'd be able to use one or other of the fast string search algorithms, but the trouble with that is, with only 2 x 8-bit patterns involved -- ie. a 2 symbol alphabet -- they simply no longer provide an benefit. So your back to using a brute-force search algorithm; but on 8 x the volume of data.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Why Boyer-Moore, Horspool, alpha-skip et.al don't work for bit strings. (And is there an alternative that does?)
by Anonymous Monk on Apr 06, 2015 at 06:30 UTC | |
by Anonymous Monk on Apr 06, 2015 at 06:31 UTC |