private int partitionSmall(T pivot,int from,int to){
  int tempIndex=0, dataIndex=from;
  for (int i=from; i <= to; i++) {
    T x=data[i];
    if (comp.compare(x,pivot) <= 0) {
      if (tempIndex > 0) {
        data[dataIndex]=x;
      }
      dataIndex++;
    }
 else {
      temp[tempIndex++]=x;
    }
  }
  if (tempIndex > 0) {
    System.arraycopy(temp,0,data,dataIndex,tempIndex);
  }
  return dataIndex;
}

private int partitionSmall ( T pivot , int from , int to ) { int tempIndex = 0 , dataIndex = from ; for ( int i = from ; i <= to ; i ++ ) { T x = data [ i ] ; if ( comp . compare ( x , pivot ) <= 0 ) { if ( tempIndex > 0 ) { data [ dataIndex ] = x ; } dataIndex ++ ; } else { temp [ tempIndex ++ ] = x ; } } if ( tempIndex > 0 ) { System . arraycopy ( temp , 0 , data , dataIndex , tempIndex ) ; } return dataIndex ; }
partition a small block using the temporary array . this will speed up partitioning .
