]> git.ipfire.org Git - thirdparty/coreutils.git/commit
seq: use faster processing for integer steps from 2 to 200
authorPádraig Brady <pbrady@fb.com>
Tue, 3 Sep 2019 09:14:48 +0000 (10:14 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 8 Sep 2019 17:59:24 +0000 (18:59 +0100)
commit1c8050cc4d862a905ba4e91ac6df2f3c1e501649
tree4f55295723c1162d47c2dcafe10eb3a5e93ba1fd
parent49b1010cc0d743098784368c28b066ed947d3b8d
seq: use faster processing for integer steps from 2 to 200

* src/seq.c: (seq_fast): Accept STEP as a parameter and use that
to skip the output of generated numbers.
(main): Relax to using seq_fast for integer steps between 1 and 200.
For larger steps the throughput was faster using the standard
incrementing procedure.
(cmp): Use the equivalent but faster memcmp for equal len strings.
* tests/misc/seq.pl: Update fast path cases.
Addresses https://bugs.gnu.org/37241
src/seq.c
tests/misc/seq.pl