You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
printf from <stdio.h> provides buffering via some other internal functions.
It would be nice, if this repo offered a printf variant, which operates on a user provided buffer to reduce the calls to putchar_.
Example:
voidputs_(constchar * data, int length)
{
// handle data block wise, instead of char wise like in putchar_
}
char buffer[10];
printf_buffered(buffer, sizeof(buffer), "0123456789+2"); // <-- calls puts_(buffer, 10); puts(buffer+10, 2);printf_buffered(buffer, sizeof(buffer), "abc"); // <-- calls puts_(buffer, 3);
Of course, one could also implement this kind of buffering inside putchar_, but at least if built without LTO, the performance would be quite a bit better for the printf_buffered.
The text was updated successfully, but these errors were encountered:
printf
from<stdio.h>
provides buffering via some other internal functions.It would be nice, if this repo offered a
printf
variant, which operates on a user provided buffer to reduce the calls toputchar_
.Example:
Of course, one could also implement this kind of buffering inside
putchar_
, but at least if built without LTO, the performance would be quite a bit better for theprintf_buffered
.The text was updated successfully, but these errors were encountered: