I have a lot of int's that I need to print super fast, to the console. Google hasn't been helpful.
I've found increasing the number of integers printed, per call to printf(), is helpful, instead of printing one number per time through the printing loop.
Instead of using:
It's faster to:Code:for(i=0;i<BigNum;i++) prinf("%d", big[i]);
I tried fwrite, but it wants char's or char arrays, not int's. By the time I transfer the int's all over to a char array, and print it, it's slower, not faster. (In very limited testing).Code:for(i=0;i<BigNum;i++) printf("%d\n%d\n%d\n, ... ", big[i],[big[i+1],big[i+2]...);
I also tried opening stdout using low level I/O. (no luck so far). Is that the way to go? Oddly, I have never tried speeding up printing reams of unreadable data, to the console before.
First time for everything, I guess. Thank you.