]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cut: optimize when no delimiter in input
authorPádraig Brady <P@draigBrady.com>
Sat, 21 Mar 2026 14:15:48 +0000 (14:15 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 5 Apr 2026 12:15:56 +0000 (13:15 +0100)
commitea6a7ba547ea18302d255b5a4013d0ea2d5d2c88
tree0c4181a3a5bd3d01a042ca8b779b62bbd86b36e2
parent7d017f83bc77ce14cae1f3ec10f07d6eb1857d81
cut: optimize when no delimiter in input

This is about 20x faster.
Note we only do the delimiter search once per chunk,
and it's usually quick as delimiters wouldn't be too far
into the a chunk if present, so we don't bother
to cache the found delimiter.
src/cut.c
tests/cut/cut.pl