File:  [Research Unix] / researchv10no / cmd / mips.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

#define	N	200
int	b1[10];
int	b2[10];

main()
{
	double t;
	register i, a = 0;
	int n;

	times(b1);
	for(n=0; n<N; n++)
	for(i=1000; --i;) {
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;a++;
		a++;a++;a++;a++;a++;a++;a++;a++;a++;
	}
	a = a;
	times(b2);
	if(b2[0])
		t = b2[0]-b1[0]; else
		t = b2[1]-b1[1];
	t = (6.*N)/t;
	printf("%.2f\n", t);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.