7 ms·
Mhm, like being recognized as constant by the compiler and turned into a call to puts?
by saagarjha 7y ago
Mhm, like being recognized as constant by the compiler and turned into a call to puts?
- tptacek 7y agoSomething Kernighan's compiler didn't do.
- overgard 7y agoHow is a 40 year old compiler relevant?
- tptacek 7y agoKernighan had puts(3) available, but chose printf(3), which does a lot more than puts. The point is Kernighan, not the compiler.
- saagarjha 7y agoTheir libc probably put the characters out slowly one-by-one for both of them, so the difference was probably just a branch or two. Not a whole set of extra syscalls.