in reply to RE: diff (different enough)
in thread diff (different enough)

At some point, the divide and conquer approach has so much overhead that the simple solutions are better. fork() is especially expensive, as once you get a few processes out there, context switching between them will take more time than plodding along in a for loop (which will probably optimize to a handful of machine code expressions anyway).

I really like the xor solution someone else pointed out, and you could probably do the 'x characters at a time' on it, too.

  • Comment on (chromatic) RE: RE: diff (different enough)

Replies are listed 'Best First'.
RE: (chromatic) RE: RE: diff (different enough)
by jettero (Monsignor) on Jul 22, 2000 at 16:36 UTC
    We also considered splitting it up. We couldn't reason out the interprocess communication properly. In actual use, this algorithm get's run every time we insert a new string. So we couldn't figure out how to reliably make sure the kids were all working on mdifferent strings--I mean, we coulda ... we just thought it was a dead end. Unless there _a lot_ of kids (on lotsa computers), it just didn't sound useful.