Krazy: prefix vs. postfix ++ and -- operators

Artur de Souza asouza at kde.org
Tue Jan 11 17:36:49 GMT 2011


Quoting Rafa? Mi?ecki <zajec5 at gmail.com>:
> Doesn't compiler optimize than anyway, when possible (like inside
> for)? I was told that when I tried using post incr. in kernel.

You're right. Most of the compilers take care of that today, so you  
don't have to worry about this anymore.
Of course you can defend one or another based on code readability and  
coding style, but performance-wise it shouldn't be a problem with  
modern compilers.

Cheers,


-------------------------------------------






More information about the kde-core-devel mailing list