aboutsummaryrefslogtreecommitdiff
path: root/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2017-05-18 22:10:04 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2017-05-18 22:10:04 +0000
commit29717eb02920eda35c810b444f7fa7b190155170 (patch)
tree2c17a270ead05e55dd91227e64771ab0b2f1f513 /cddl/usr.sbin/dtrace/tests/tools/exclude.sh
parentde29cd0869e37df15a49283781c378181cdd0c93 (diff)
downloadsrc-29717eb02920eda35c810b444f7fa7b190155170.tar.gz
src-29717eb02920eda35c810b444f7fa7b190155170.zip
sh: Keep output buffer across builtins.
Allocating and deallocating repeatedly the 1024-byte buffer for stdout from builtins costs CPU time for little or no benefit. A simple loop containing builtins that write to a file descriptor, such as i=0; while [ "$i" -lt 1000000 ]; do printf .; i=$((i+1)); done >/dev/null is over 10% faster in a simple benchmark on an amd64 virtual machine.
Notes
Notes: svn path=/head/; revision=318502
Diffstat (limited to 'cddl/usr.sbin/dtrace/tests/tools/exclude.sh')
0 files changed, 0 insertions, 0 deletions