bin/86485: [patch] hexdump(1): hexdump -s speedup on /dev

arundel at arundel at
Sun Aug 29 12:17:47 UTC 2010

Synopsis: [patch] hexdump(1): hexdump -s speedup on /dev

State-Changed-From-To: open->analyzed
State-Changed-By: arundel
State-Changed-When: Sun Aug 29 12:01:55 UTC 2010
The cause for this issue is the use of getchar() which tests every character
against EOF. This causes huge overhead as can be seen in this comparison
between the BSD and Linux hexdump versions:

FreeBSD:	Linux:
real 44,85	real 0.00
user 4,51	user 0.00
sys 38,76	sys 0.00

The command used for this was
'time -p hexdump -n 100 -s 1000000000 /dev/random'. Higher values for -s would
simply take too much time on FreeBSD. ;)

Responsible-Changed-From-To: freebsd-bugs->arundel
Responsible-Changed-By: arundel
Responsible-Changed-When: Sun Aug 29 12:01:55 UTC 2010
Assign to me. Although i don't have commit rights to src i'm working on this
issue atm.

More information about the freebsd-bugs mailing list