bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20029: 'yes' surprisingly slow


From: Ole Tange
Subject: 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 <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]