4 ms·
Neither GCC nor Clang bake the final string into the data segment. If I had to guess, printf is the one preventing the more fancy optimizations to take place.
by jessermeyer 4y ago
Neither GCC nor Clang bake the final string into the data segment. If I had to guess, printf is the one preventing the more fancy optimizations to take place.
- vardump 4y agoI think so too. Also, depending on stdlib output buffering, the external I/O behavior of 100 puts calls is potentially different from just one call. In other words, there might be a different number of stdout write-calls.