xiangfu0 commented on PR #19795:
URL: https://github.com/apache/pinot/pull/19795#issuecomment-6079720017

   One additional finding on unchanged-but-affected code (not 
inline-commentable since the lines are outside the diff):
   
   **Efficiency — 
`PercentileSmartTDigestAggregationFunction.convertValueListToTDigest` (lines 
187-194):** when a group crosses `_threshold` (default 100k values), the 
`DoubleArrayList` is drained one element at a time via `iterator.nextDouble()` 
+ the virtual `TDigest.add(double)`, paying a virtual call, NaN check, 
`requireMutable` cache invalidation, and two buffer-limit comparisons per 
value. The new accumulator exposes the bulk path that 
`PercentileTDigestAggregationFunction.aggregateSV` already uses:
   
   ```java
   PercentileTDigestAccumulator tDigest = new 
PercentileTDigestAccumulator(_compression);
   tDigest.add(valueList.elements(), 0, valueList.size());
   return tDigest;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to