The question is pretty straight-forward, what is the fastest way to print out a string to the terminal?
I am making an "ASCII graphics engine" in C++, particularly on Linux, and i have noticed that printing with some big resolutions can be pretty slow.
Now, of course, its pretty fast, but still.
I want to find out whats the absolute fastest. Some things i have tried are just printing with cout, then i realized that was slow.
Then i printed with printf which was a huge difference.
I tried getting something faster by just using fwrite with stdout, but it didnt really make any noticeable difference.
I know it also depends on the terminal emulator, but im looking for whats the fastest way to do it in code.
I have noticed that Windows terminals are pretty fast, you can just directly write to the terminal buffer with the terminals, instead of printing to stdout.
Is there anything similiar to this on Linux?