Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2010 12:17:47 GMT
From:      arundel@FreeBSD.org
To:        toby@apple.com, arundel@FreeBSD.org, freebsd-bugs@FreeBSD.org, arundel@FreeBSD.org
Subject:   Re: bin/86485: [patch] hexdump(1): hexdump -s speedup on /dev
Message-ID:  <201008291217.o7TCHlRi074042@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
State-Changed-Why: 
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
Responsible-Changed-Why: 
Assign to me. Although i don't have commit rights to src i'm working on this
issue atm.

http://www.freebsd.org/cgi/query-pr.cgi?pr=86485



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008291217.o7TCHlRi074042>