GNU bug report logs - #20029
'yes' surprisingly slow

Previous Next

Package: coreutils;

Reported by: Ole Tange <tange <at> gnu.org>

Date: Sat, 7 Mar 2015 11:50:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 20029 <at> debbugs.gnu.org (full text, mbox):

From: Ole Tange <tange <at> gnu.org>
To: Giuseppe Scrivano <gscrivano <at> gnu.org>
Cc: 20029 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigbrady.com>
Subject: Re: bug#20029: 'yes' surprisingly slow
Date: Tue, 10 Mar 2015 22:18:23 +0100
On Tue, Mar 10, 2015 at 1:31 AM, Giuseppe Scrivano <gscrivano <at> gnu.org> wrote:

> $ time src/yes `echo {1..2000}` | head -c 2000M | md5sum
> 55c293324aa6ecce14f0bf30da5a4686  -
>
> real    0m7.994s
> user    0m11.093s
> sys     0m2.953s
>
> versus (with the patch):
>
> $ time src/yes `echo {1..2000}` | head -c 2000M | md5sum
> 55c293324aa6ecce14f0bf30da5a4686  -
>
> real    0m3.534s
> user    0m4.164s
> sys     0m1.803s

Are you sure your are not limited by md5sum?

$ time yes "`echo {1..2000}`" | head -c 2000M >/dev/null

real    0m0.660s
user    0m0.180s
sys     0m1.115s

The solution should perform no worse than that.


/Ole




This bug report was last modified 10 years and 80 days ago.

Previous Next


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