Jim Meyering wrote: > >>From 6dd9c564a0cba6eec95102f091c6692a5ab48876 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Fri, 6 Mar 2009 10:27:43 +0100 > Subject: [PATCH] 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. > (main): Use it, to compute larger input and output buffer sizes > derived from st_blksize, now typically 32KiB rather than 4KiB. > Suggestion from Tzvi Rotshtein.
That sounds like previously cat did not derive from st_blksize and that st_blksize is typically 32KiB :) Suggested log message: * 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 minimum of 32KiB. Previously the typical block sizes used were 1KiB for pipes and 4KiB for files. (main): Use it. This was seem to increase throughput by up to 50%. Suggestion from Tzvi Rotshtein. cheers, Pádraig. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
