GNU bug report logs - #37241
large performance gap when start+inc specified with 'seq'

Previous Next

Package: coreutils;

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 #16 received at 37241-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: L A Walsh <coreutils <at> tlinx.org>
Cc: 37241-done <at> debbugs.gnu.org
Subject: Re: bug#37241: large performance gap when start+inc specified with
 'seq'
Date: Thu, 5 Sep 2019 11:40:57 +0100
On 04/09/19 21:42, L A Walsh wrote:
> 
> 
> On 2019/09/03 18:51, Pádraig Brady wrote:
>> Yes we could be better here.
>> Attached is a fairly simple improvement:
>>
>> $ time seq.new 1 1 1e8 >/dev/null
>> real	0m1.516s
>>
>> $ time seq.new 1 2 1e8 >/dev/null
>> real	0m0.834s
>>
>> $ time seq.orig 1 2 1e8 >/dev/null
>> real	0m40.435s
>>
>> It might be improved further with BCD addition of the step string,
>> but this should be good for now.
> ---
> 	Thanks, um, do you know what the time would have been
> on your machine of the original, non-explicit case, i.e.:
> 
> time seq.new 1e8 >/dev/null

`seq 1e8` is treated the same as `seq 1 1 1e8` on both old and new code.
I.E. a step of 1 was treated specially, even if specified.
I'll push this later. Marking as done.

cheers,
Pádraig




This bug report was last modified 5 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.