Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Favorite Part of the FQA?

Name: Anonymous 2010-07-30 14:59

My favorite is from the section on operator overloading, 13.15. The question is: which is more efficient, ++i or i++?
FAQ: It's the same for built-in types. ++i may be faster for user-defined types, because there's no need to create a copy that the compiler may fail to optimize out. Most likely the overhead is small, but why not pick the habit of using ++i?
FQA: Oh, suddenly the all-mighty compiler can't optimize out a temporary!
[high-five /]

Name: Anonymous 2010-07-31 12:45

Copyright © 2007-2009 Yossi Kreinin
revised 17 October 2009

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List