amrishlal commented on pull request #7442:
URL: https://github.com/apache/pinot/pull/7442#issuecomment-933991416


   Sorry, not sure if I missed anything here, but prefix increment is generally 
considered more performant than postfix increment mainly because postfix 
increment makes a copy of the original object; while as, prefix increment 
doesn't. If we use postfix increment in a loop, then that means making a copy 
for each iteration of the loop (and this can be fairly expensive). C++ / STL 
books almost always recommend using prefix increment for the same reason. If we 
were going to impose a standard, I thought it would be the other way (mandating 
prefix increment in loops and avoiding postfix increment)?
   
   https://iq.opengenus.org/postfix-vs-prefix-increment-java/
   
   


-- 
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