Here are some implementations to output numbers I found
Time to write first 10.000.000 non-negative numbers (base on Codeforces Custom Test // GNU G++ 17 7.3.0)
Putchar Non-recursive Dividing Implementation: 3649ms
Putchar Recursive Implementation: 3510ms
Putchar Reverse Implementation: 3462ms
Putchar Non-recursive toString Implementation: 3369ms
Printf Implementation: 1762ms
synchronized(off) Implementation: 1356ms
synchronized(true) Implementation: 1060ms
Normal Cout Implementation: 1045ms
fwrite buffer Implementation: 545ms
Time to write 1.000 times first 10000 numbers (base on [Codeforces Custom Test](https://codeforces.me/problemset/customtest) // GNU G++ 17 7.3.0)
Putchar Reverse Implementation: 1981ms
Putchar Non-recursive Dividing Implementation: 1980ms
Putchar Non-recursive toString Implementation: 1934ms
Putchar Recursive Implementation: 1887ms
Printf Implementation: 1216ms
synchronized(on) Implementation: 873ms
Normal Cout Implementation: 873ms
synchronized(off) Implementation: 857ms
fwrite buffer Implementation: 311ms
Time to write first 10.000.000 non-positive numbers (base on Codeforces Custom Test // GNU G++ 17 7.3.0)
Putchar Non-recursive toString Implementation: 3946ms
Putchar Reverse Implementation: 3930ms
Putchar Recursive Implementation: 3915ms
Putchar Non-recursive Dividing Implementation: 3883ms
Printf Implementation: 1808ms
synchronized(off) Implementation: 1481ms
synchronized(true) Implementation: 1092ms
Normal Cout Implementation: 1092ms
fwrite buffer Implementation: 561ms
Single Line Template
Putchar Non-recursive toString Implementation
Putchar Reverse Implementation
Putchar Recursive Implementation
Putchar Non-recursive Dividing Implementation
Printf Implementation
synchronized(off) Implementation
synchronized(true) Implementation
Cout Implementation
fwrite buffer Implementation
---------- About: ----------