summaryrefslogtreecommitdiff
path: root/README-package-renamed-to-coreutils
diff options
context:
space:
mode:
authorCojocaru Alexandru <xojoc@gmx.com>2013-04-28 03:03:45 +0100
committerPádraig Brady <P@draigBrady.com>2013-04-29 17:54:39 +0100
commitef9db5735a401f60eb5b4a18a365bf1ece525053 (patch)
tree836c6d92830d2fa3037e2378e4277dc634bb81ef /README-package-renamed-to-coreutils
parent3e466ad05181d95057e6612ff11059c91396cd0e (diff)
downloadcoreutils-ef9db5735a401f60eb5b4a18a365bf1ece525053.tar.xz
cut: reduce CPU overhead in determining item to output
print_kth() is the central function of cut used to determine if an item is to be output or not, so simplify it by moving some logic outside. Benchmark results for this change are: $ yes abcdfeg | head -n1MB > big-file $ for c in orig split; do src/cut-$c 2>/dev/null echo -ne "\n== $c ==" time src/cut-$c -b1,3 big-file > /dev/null done == orig == real 0m0.111s user 0m0.108s sys 0m0.002s == split == real 0m0.088s user 0m0.081s sys 0m0.007s * src/cut.c (print_kth): Refactor a branch to outside the function. Related to http://bugs.gnu.org/13127
Diffstat (limited to 'README-package-renamed-to-coreutils')
0 files changed, 0 insertions, 0 deletions