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) Cout Implementation: 1356ms
synchronized(off) Cout 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) Cout 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) Cout Implementation: 1481ms
synchronized(off) Cout 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) Cout Implementation
synchronized(off) Cout Implementation
Cout Implementation
fwrite buffer Implementation
---------- About: ----------
---------- Planning: ----------
- Test about random 10.000.000 big numbers
- Test with
GNU G++ 14 6.4.0
- Test with
GNU G++ 11 5.1.0
- More implementations (Actually the post is about Faster and Faster Short Output Implementation but I will add some for speed comparing)
- New type of implementations (long long, double, string)