mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Make stderr go faster
This change makes _IONBF (unbuffered) stdio handles go 20x faster for certain kinds of formatting directives by being smarter about buffers
This commit is contained in:
parent
2cbd09b4d4
commit
8fc778162e
6 changed files with 70 additions and 38 deletions
|
@ -432,7 +432,7 @@ privileged static size_t kformat(char *b, size_t n, const char *fmt,
|
|||
FormatUnsigned:
|
||||
if (x && hash) sign = hash;
|
||||
for (i = j = 0;;) {
|
||||
x = DivMod10(x, &rem);
|
||||
x = __divmod10(x, &rem);
|
||||
z[i++ & 127] = '0' + rem;
|
||||
if (pdot ? i >= prec : !x) break;
|
||||
if (quot && ++j == 3) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue