title: Sorting tuples inside signed integers
body: <p>I'm sorting tuples of 16+16 bits as 32bit integers with SSE2. There are only signed integer instructions for compare and min/max. I don't have a problem with the order for the higher part as its just a hash. But entries with negative hashes will be sorted backwards (right?) Possible but not great solutions could be:</p>
  
  <ul>
  <li>Zero the higher bit for hashes, losing precision (not great)</li>
  <li>Convert the position to negative if the higher bit of the hash is set, and convert it back after sorting.</li>
  </ul>
  
  <p>Is there a better way?</p>