On 11/5/07, Dan McGee <dpmcgee@gmail.com> wrote:
On Nov 5, 2007 10:40 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 11/5/07, Dan McGee <dpmcgee@gmail.com> wrote:
And there is no need to use puts/fputs if you just use a format string correctly: printf("%s", stringtoprint) instead of printf(stringtoprint), as far as I know.
Yeah, that works too - f/puts() is just a little cheaper of a call, but that's me being snarky. I tend to use "++i" because it has the potential to be equal to "i++" or _one_ clock cycle faster 8)
I would guess GCC is able to optimize calls to printf("%s") quite well, in addition to figuring out i++ vs. ++i (especially when there are 0 side effects from interchanging them). But that is just a guess. :)
Zero side effects if-and-only-if there is no assignment as part of that expression 8)