RawComparator implementation, with testsuite