There's a highly tuned set of libraries available for computing HDR histograms with minimal overhead: https://github.com/HdrHistogram. This gets you a little closer to a continuous distribution, and does away with the branching needed for explicit buckets.