GNU bug report logs -
#37241
large performance gap when start+inc specified with 'seq'
Previous Next
Reported by: L A Walsh <coreutils <at> tlinx.org>
Date: Fri, 30 Aug 2019 23:31:01 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Was looking at some large sequences and the time they took
and found that while end-point only was fast:
declare -x TIMEFORMAT="%2Rsec %2Uusr %2Ssys (%P%% cpu)"
> time seq 1e8 >/dev/null
0.75sec 0.74usr 0.01sys (99.77% cpu)
Trying just to generate only odd numbers:
> time seq 1 2 1e8 >/dev/null
24.70sec 24.64usr 0.01sys (99.82% cpu)
took way longer.
Shouldn't the 2nd case take about half as long as
the first? They are both adding integers though in
2nd case, its skipping the "even"s on output.
If it was some floating point calculation needed, I might not
have blinked, but both an integer sequence with the 2nd
being half as long? Should half the numbers take almost 33x
longer?
This bug report was last modified 5 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.