When we trying to analyze the runtime of printf, the algorithm that formats the string
is not going to be the performance bottleneck. Printf is a blocking function, meaning that it waits
until whatever it's printing has actually displayed before the execution of the program is resumed.
The performance of printf is mostly dependant on what type of console we displaying to. I did a test with a simple program:
#include <stdio.h>
int main()
{
for (int i = 0; i < 1000000; i++) // 1 million iterations
printf("hello, world\n");
return 0;
}