Get rid of inefficient histogram reduction implementations