summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-03-06 10:27:43 +0100
committerJim Meyering <meyering@redhat.com>2009-03-06 14:41:47 +0100
commit02c3dc9de8d3cf26b319b7a7b144878a2afb91bb (patch)
tree9f1bd130e682decd35b72995b1b3d75bafdaeced /gl
parent8b638f994abefde84746b3d8a08893c9ffeb7799 (diff)
downloadcoreutils-02c3dc9de8d3cf26b319b7a7b144878a2afb91bb.tar.xz
cat: use larger buffer sizes to reduce read/write-syscall overhead
* src/cat.c (max): Remove definition. Use MAX from system.h instead. (compute_buffer_size): New function to compute the input and output buffer sizes, which are now set at 8 times st_blksize with a maximum of 32KiB. Previously the typical block sizes used were 1KiB for pipes and 4KiB for files, and now will be 8KiB and 32KiB respectively. (main): Use it. This change can double throughput on modern systems. For timings, see http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/16040 Suggestion from Tzvi Rotshtein.
Diffstat (limited to 'gl')
0 files changed, 0 insertions, 0 deletions