improve performance of equalize example

percentile can compute multiple ranks in one go which in the case of the
example halves the required time.