D
DamonChong
Hi,
Just curious as I'm new to C++ coming from Java background. Is there a
difference in terms of performance if I used i++ instead of ++i in my
codes such as
for(int i=0; i<size; i++)
vs
for(int i=0; i<size; ++i)
I'm under the impression certain compilers like Visual C++ prefers ++i
as it does not create temporaries
(http://www.tantalon.com/pete/cppopt/final.htm).
Thanks in advance for any clarifications!
Regards,
Damon
Just curious as I'm new to C++ coming from Java background. Is there a
difference in terms of performance if I used i++ instead of ++i in my
codes such as
for(int i=0; i<size; i++)
vs
for(int i=0; i<size; ++i)
I'm under the impression certain compilers like Visual C++ prefers ++i
as it does not create temporaries
(http://www.tantalon.com/pete/cppopt/final.htm).
Thanks in advance for any clarifications!
Regards,
Damon