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


   @amrishlal the loops in the benchmarks use increments in **the only places** 
that the pre-increments are banned. 
   
   Please add the following lines of code into any pinot module
   
   ```java
       int i = 1;
       ++i;
   ```
   
   and convince yourself that Checkstyle permits this code by building the 
module.
   
   Now try to write:
   
   ```java
   for (int i = 0; i < 10; ++i) {
   
   }
   ```
   
   and observe the checkstyle validation error:
   
   ```
   (misc) DescendantToken: Count of 1 for 'FOR_ITERATOR' descendant 'INC' 
exceeds maximum count 0.
   ```
   
   The loops in the benchmarks demonstrate that the Checkstyle rule makes no 
difference to performance **where the rule applies**, and they also demonstrate 
that principles from C++ don't always apply to JIT compiled languages.


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