Pádraig Brady <[email protected]> writes:

> On 16/03/2026 15:24, Arsen Arsenović wrote:
>> Pádraig Brady <[email protected]> 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