startup-time
startup-time copied to clipboard
C code should use `puts`
The current code uses printf which allows for formatted/dynamic output, but I would expect it to use puts for verbatim output.
In this case it makes no difference. They should both compile to a single mov instruction.
I think puts is more idiomatic for a constant string, but you're right that there's no difference in performance--gcc and clang are smart enough to replace the printf call with puts:
https://godbolt.org/z/s5qzbrMqe