Reduce /etc/dump user CPU time by 65%

speck at brl-tgr.ARPA speck at brl-tgr.ARPA
Wed Dec 12 17:07:33 AEST 1984


Index:		etc/dump/dumptape.c (4.2BSD)
Description:	'dump' spends over 2/3 of its user time
		copying 1K-byte arrays inefficiently.
Fix:	Replace the slow code with a structure copy (uses movc3 on vax).
	diff old/dumptape.c dumptape.c
	30,33c30
	<	register i;
	<
	<	for (i=0; i < TP_BSIZE; i++)
	<		tblock[trecno][i] = *dp++;
	---
	>	*(union u_spcl *)(tblock[trecno]) = *(union u_spcl *)dp;
--------
    Don Speck	"Cryptic?  Why do you think they call it CODE?"



More information about the Comp.unix.wizards mailing list