diff options
author | Elliott Hughes <enh@google.com> | 2020-12-04 10:06:49 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-12-05 04:24:36 -0600 |
commit | 72ec2b37468d7f1f0c15e6b201f914802d9d3b4f (patch) | |
tree | 41e6a7904e435bf0a060e035c6e70013b3b20063 /tests/files | |
parent | ec6639407b9eabf986ba81cfa6f2910feddf32dc (diff) | |
download | toybox-72ec2b37468d7f1f0c15e6b201f914802d9d3b4f.tar.gz |
tr: fix pathological flushing.
The AOSP build doesn't use tr (or anything that's still in pending), but
the kernel folks have been more aggressive. They found that tr's
pathological flushing was adding minutes to their build times.
Just removing the fflush() made tr significantly faster for my trivial
test, but still slow, with all the time going into stdio. Rewriting the
loop to modify toybuf in place and then do one write per read made most
of the difference, but special-casing the "neither -d nor -s" case made
a measurable difference too on a Xeon.
Bug: http://b/174773617
Diffstat (limited to 'tests/files')
0 files changed, 0 insertions, 0 deletions