code: @Override
  	public int compare(int i, int j) {
  		final int bufferNumI = i / this.indexEntriesPerSegment;
  		final int segmentOffsetI = (i % this.indexEntriesPerSegment) * this.indexEntrySize;
  		
  		final int bufferNumJ = j / this.indexEntriesPerSegment;
  		final int segmentOffsetJ = (j % this.indexEntriesPerSegment) * this.indexEntrySize;
  		
  		final MemorySegment segI = this.sortIndex.get(bufferNumI);
  		final MemorySegment segJ = this.sortIndex.get(bufferNumJ);
  		
  		int val = MemorySegment.compare(segI, segJ, segmentOffsetI + OFFSET_LEN, segmentOffsetJ + OFFSET_LEN, this.numKeyBytes);
  		
  		if (val != 0 || this.normalizedKeyFullyDetermines) {
  			return this.useNormKeyUninverted ? val : -val;
  		}
  		
  		final long pointerI = segI.getLong(segmentOffsetI);
  		final long pointerJ = segJ.getLong(segmentOffsetJ);
  		
  		return compareRecords(pointerI, pointerJ);
  	}
docs: /* (non-Javadoc)
  @see eu.stratosphere.pact.runtime.sort.IndexedSortable#compare(int, int)