You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/10/05 01:47:02 UTC
[GitHub] [pinot] amrishlal commented on pull request #7442: ban prefix increment
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org