William M. answered 12/22/19
SW dev in genAI, Operating Systems, Cybersecurity, Blender/Unreal 5
Yes, ++i increments the variable directly
++i makes a temporary copy, increments the variable, and returns the copy. This slows down the increment.
You can also see this in the assembly code.
Google's style guideline now wants C++ programmers to use ++i whenever possible.
See the following: https://google.github.io/styleguide/cppguide.html#Preincrement_and_Predecrement