Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
codeflo
· 12y ago · 0 comments
With compiler optimizations turned on, it's almost guaranteed
not
to happen, because a and b are very likely to be stored in CPU registers.
Comments
[–]
mgraczyk
12y ago
Or rather, a and b will be constant folded so that the printf call is optimized to "push #4; push ptrFmt; call printf"
[–]
Someone
12y ago
A truly good compiler would replace that printf by a call to putchar or pass a constant string to 'write' (gcc almost (?) does that. See
http://www.ciselant.de/projects/gcc_printf/gcc_printf.html
)