amrishlal commented on pull request #7442: URL: https://github.com/apache/pinot/pull/7442#issuecomment-934556709
@richardstartin I am not quite sure what you are trying to imply by dumping out assembly code, but a simple way to verify performance (that in java a loop with preincrement performs much better than a loop with postincrement) would be to run a simple performance test: ``` % javac benchmark_opengenus.java % java benchmark_opengenus i++ took 2093664 nanoseconds ++i took 1521015 nanoseconds ++i took 72.65 % of time taken by i++ ``` The code for this benchmark is taken from the article (https://iq.opengenus.org/postfix-vs-prefix-increment-java/) that I posted above and I get similar results using different java versions on both mac and linux. We can't be banning preincrement in loops as that is exactly what we want to do to get better performance. -- 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]
