coreutils
[Top][All Lists]
Advanced

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

Re: updating yes(1) to use zero-copy on Linux


From: Arsen Arsenović
Subject: Re: updating yes(1) to use zero-copy on Linux
Date: Tue, 17 Mar 2026 10:20:51 +0100

Pádraig Brady <P@draigBrady.com> writes:

> On 16/03/2026 15:24, Arsen Arsenović wrote:
>> Pádraig Brady <P@draigBrady.com> writes:
>> 
>>> Then you could generate zeros with: yes -z ''
>> Why not just read /dev/zero?
>>    $ pv </dev/zero >/dev/null
>>    98.3GiB 0:00:06 [15.7GiB/s]
>
> Yes, though that seems to use a read()/write() loop,
> and goes at about half the speed on my system.

That may be the case for 'pv', but 'pv' wasn't key there.  Linux
probably treats reads from /dev/zero as fast-track to bzero() or a
similar functions if I had to guess.
-- 
Arsen Arsenović

Attachment: signature.asc
Description: PGP signature


reply via email to

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