HdrHistogram_c icon indicating copy to clipboard operation
HdrHistogram_c copied to clipboard

Double histograms

Open Licenser opened this issue 8 years ago • 2 comments

I'm curious why double histograms are 'not likely to be implemented'. No criticism just wonder if it's a technical issue, simply no personal need for them, a strong distaste for doubles (which I can totally sympathise with)? Would a PR to that end be accepted (can't guarantee I'll make one as my c is not strong, but I might try)?

Licenser avatar Dec 18 '16 16:12 Licenser

Abstracting the counter type (int, long, double) is tricker in C than the other supported languages (Java, etc). It would require either some macro-fu and a complete re-implementation for the alternative data types. This would either complicate the existing implementation or require a significant amount of duplicate work. Given that no one has asked for it and I don't have a use for it, it felt like a significant cost for very little value.

If you wanted to implement it, then the second option would be preferable as it would not complicate the existing implementation.

However, it you are looking at making a contribution a more pressing feature is dynamically reallocating/resizing the counts array. The Java version has this feature.

mikeb01 avatar Dec 23 '16 08:12 mikeb01

Hi Mike, thanks for the reply. My interest at the moment is especially about the float part, as it's something I need :) but I totally understand that it's no interest. I'll fork and see what I can do with changing the implementation over to floats.

Cheers, Heinz

Licenser avatar Dec 23 '16 09:12 Licenser