Batch histogramming