shrink_to_fit TDigest after merge
Summary: When used in a QuantileEstimator, some sliding window buckets can be sparse or all together empty. In this case, reserving memory in the constructor and in merge is wasteful. Don't reserve in the constructor (this is a complete waste) and call shrink_to_fit in merge. It's worth noting that the benchmarks *are* shrinking the digest, because the digests are only 85 or so items big, so it is exercising this path. Reviewed By: yfeldblum Differential Revision: D7855242 fbshipit-source-id: 61bcbaaf17dd46f8b98d171af43516ceb8d84510
Showing
Please register or sign in to comment