codahale/metrics — pull request #129 by ciamac (2011-12-03 15:17:23+00:00)
Title: cache arrays to avoid memory allocation in HistogramMetric

This patch caches the arrays that are used to atomically update variance calculations, so that memory is not allocated every time HistogramMetric.updateVariance() is called. This is helpful when I'm updating metrics tens of thousands times per second in my application.