gianm opened a new pull request #10906: URL: https://github.com/apache/druid/pull/10906
They all use Long.compare, but they don't need to. Changing to regular comparisons simplifies the code and also removes branches. (Internally, Long.compare has two branches.) I tried benchmarking before/after using query 6 of SqlBenchmark, and the results were inconclusive as to whether removing the branches makes a noticeable performance improvement. But, if nothing else, at least the code is nicer. ``` master Benchmark (query) (rowsPerSegment) (vectorize) Mode Cnt Score Error Units SqlBenchmark.querySql 6 1000000 force avgt 15 25.176 ± 0.762 ms/op patch Benchmark (query) (rowsPerSegment) (vectorize) Mode Cnt Score Error Units SqlBenchmark.querySql 6 1000000 force avgt 15 24.862 ± 0.610 ms/op ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
