You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sparse Histogram is generally more space-efficient in memory, but harder to update. This makes it an ideal format for read-only histograms.
Meanwhile, getting the value for a particular percentile is relatively expensive in the default histogram, due to the need to sum operation across buckets. However, storing cumulative counts (as summed from bucket 0) representation removes the need to compute any intermediary results—only comparison is needed. An implementation in JS is done by @yurivish in https://github.com/iopsystems/h2-histogram-js/blob/main/src/index.js#L298
Combining these two design choices—sparsity and accumulative counts—will yield a superior read-only histogram.