On 18. Sep 2018, at 09:41, Hans Dembinski
wrote: there is a minor overhead in the return value. Whenever you query the adaptive_storage, two doubles - one for the value and one for the variance -, which is slightly wasteful if you don't care about the variance, then you would need only one double. I don't know how smart compilers are in this case, the compiler may even remove the code that fills the second double when it is not used. In memory, the adaptive_storage uses only a single integer for each counter if you don't use weighted fills.
Ah, sorry, I don't have a stroke, I am just an hurry, should have read again before sending. There is a minor overhead when the return value is created as you call ".at(…)". Whenever you query the adaptive_storage, two doubles are filled - one for the value and one for the variance -, which is slightly wasteful if you don't care about the variance. In that case, you would need only one double. I don't know how smart compilers are in this case, the compiler may even remove the code that fills the second double if it is not used. In memory, the adaptive_storage uses only a single integer for each counter if you don't use weighted fills.