if ((word * 0xfffffffffffffff1) < 16) {

return word;

}

I lost the code at the moment (it’s not in the directory I thought I developed in) but in the next week or so I’ll either find it or re-write. Note that your harness is doing two sorts — one with John’s reference and one with your sort, which may be fewer SAT vars but may be much more complex than my harness for just John’s reference. Instead of sorting twice (since I’m checked the ref, so where do I get a ref?) I

0) Back up the buffer to be sorted

1) Call John’s code

2) Make sure John’s code produces sorted buffer items

3) Check each sorted buffer item to make sure it’s a permutation of the original

I did it by nibbles and also did the sort check (not permutations of course) by bytes since nibbles sorted implies byte-sorted. The SAT numbers I give are for bytes.

2 + 3 is simpler semantics than comparing two sorts, I suspect. My bigger SAT is just the 10 buffers, which probably are less a problem than the “proof” (UNSAT) construction of equivalence of the two

sorts. I’m also running an old CBMC, maybe that helps

Should get a 2-2.5x speedup.

]]>