Here are some implementation to output numbers I found and the time to write [first 10.000.000 numbers] (base on Codeforces Custom Test // GNU G++ 17 7.3.0)
Putchar Recursive Implementation: 3525ms
Putchar Non-recursive Implementation: 3525ms
Putchar Reverse Implementation: 3493ms
Printf Implementation: 1762ms
synchronized(off) Implementation: 1356ms
synchronized(true) Implementation: 1060ms
Normal Implementation: 1045ms
fwrite buffer Implementation: 545ms
Here are some implementation to output numbers I found and the time to write [1.000 times first 10000 numbers] (base on Codeforces Custom Test // GNU G++ 17 7.3.0)
Putchar Reverse Implementation: 1981ms
Putchar Non-recursive Implementation: 1980ms
Putchar Recursive Implementation: 1808ms
Printf Implementation: 1216ms
synchronized(on) Implementation: 873ms
Normal Implementation: 873ms
synchronized(off) Implementation: 857ms
fwrite buffer Implementation: 311ms