]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Replace hand-crafted naive byte-by-byte zero block detection routine
authorsobomax <sobomax@FreeBSD.org>
Thu, 29 Nov 2018 19:28:01 +0000 (19:28 +0000)
committersobomax <sobomax@FreeBSD.org>
Thu, 29 Nov 2018 19:28:01 +0000 (19:28 +0000)
commit8d1fd0fff1b73d770857ca2cb3ed3cb0de10a604
treed35261be8adc5986baf73412030722df77b9435a
parent1d9125b01c54a43f905b7c623ff24b0b93550587
Replace hand-crafted naive byte-by-byte zero block detection routine
with macro based around memcmp(). The latter is expected to be some
8 times faster on a modern 64-bit architectures.

In practice, throughput of doing conv=sparse from /dev/zero to /dev/null
went up some 5-fold here from 1.9GB/sec to 9.7GB/sec with this change
(bs=128k).

MFC after: 2 weeks
bin/dd/dd.c
bin/dd/dd.h