in reply to Re^4: [OT] The interesting problem of comparing bit-strings. (More info.)
in thread [OT] The interesting problem of comparing bit-strings.

My turn to wonder if I'm missing something fundamental or failing to communicate my solution.

I guess I'm just going to have to find time to code up a working example.

Either I'll prove my concept or figure out which kind of left field I'm standing in.  :-)

  • Comment on Re^5: [OT] The interesting problem of comparing bit-strings. (More info.)
  • Download Code

Replies are listed 'Best First'.
Re^6: [OT] The interesting problem of comparing bit-strings. (More info.)
by BrowserUk (Pope) on Mar 25, 2015 at 11:48 UTC

    Please see Re^6: [OT] The interesting problem of comparing bit-strings. for the problems of finding bitstring needles that cross byte boundaries using byte-wise operations.

    In brief, you need to perform two (different) byte compares using two different byte masks at each of 7 different offsets (with different masks and comparison values for each) for every byte in the haystack in order to locate a single byte needle.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

      Yes.

      And I am proposing that that is where your solution lies.

      This is a relatively simple but fun coding exercise. I happily accept the gauntlet, and will return with my shield, or on it..

        Wow. I haven't been caught using "that that" in decades. I guess I was in too much of a hurry and hadn't had my coffee yet for that one.