gortiz commented on PR #12354: URL: https://github.com/apache/pinot/pull/12354#issuecomment-1948171973
I've repeated the benchmark with: - Java 21 - 1M rows per segment (instead of 10k) - 3 consecutive nulls every 3 not null rows (instead of 1 every 127) And the results are: ``` Benchmark (_aQueryTemplate) (_impl) (_nullHandling) Mode Cnt Score Error Units BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark normal true thrpt 25 0.172 ± 0.005 ops/ms BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark normal false thrpt 25 0.175 ± 0.005 ops/ms BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark foldDouble true thrpt 25 0.156 ± 0.006 ops/ms BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark foldDouble false thrpt 25 0.158 ± 0.006 ops/ms BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark foldPrimitive true thrpt 25 0.206 ± 0.006 ops/ms BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark foldPrimitive false thrpt 25 0.197 ± 0.016 ops/ms BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark foldHolder true thrpt 25 0.200 ± 0.031 ops/ms BenchmarkSumAggregation.test select sum(valueLong, '%s') from benchmark foldHolder false thrpt 25 0.218 ± 0.018 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark normal true thrpt 25 0.174 ± 0.005 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark normal false thrpt 25 0.175 ± 0.005 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark foldDouble true thrpt 25 0.151 ± 0.012 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark foldDouble false thrpt 25 0.151 ± 0.012 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark foldPrimitive true thrpt 25 0.189 ± 0.020 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark foldPrimitive false thrpt 25 0.190 ± 0.016 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark foldHolder true thrpt 25 0.190 ± 0.010 ops/ms BenchmarkSumAggregation.test select sum(valueInt, '%s') from benchmark foldHolder false thrpt 25 0.194 ± 0.018 ops/ms ``` So it seems some of the solutions are even faster than the original one, although the ones that go faster are a bit different than the original code, as they actually add ints or longs and then the value is added into the double, which is obviously more expensive -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org