Instead of looking for the maximum over the keys sorting keys in [0,max] we
should also compute the minimum and only sort [0, max - min] by subtracting
min from all the keys.
This process can be achieved with essentially no cost, since the min
reduction can be fused with the max reduction and the key - min
transformation can be fused with the current preprocess/postprocess steps.
This will provide an especially significant speedup for signed integers
with negative values near 0.
Original issue reported on code.google.com by wnbell on 4 Sep 2009 at 5:08
Original issue reported on code.google.com by
wnbell
on 4 Sep 2009 at 5:08