Sprintf timings

Bill Ezell wje at sii.UUCP
Thu Mar 22 02:17:35 AEST 1984


b
Here are some interesting statistics on a few systems:

main()
{
register int x;
char str[50];
double fl;

  fl = (double) 2.2;
  printf("START\n");
  for(x = 0; x < 100; x++)
    sprintf(str, "%5.5f",fl);
  printf("END\n");
}

Using the "time" command when executing the binary:

Onyx	0.3u	0.4s	0:01	 76%
Zilog	0.3u	2.0s	0:02	110%
NCR     1.4u	0.2s	0:26	 22%
Altos  26.0u	0.2s	0:26	 99%
Zentec 44.6u	0.3s	0:55	 81%

Does anyone know why the Altos and Zentec are so bad? They are both
Xenix ports, by the way.

	-Bill Ezell
	 Software Innovations, Inc.
	 (decvax,ittvax,masscomp)!sii!wje



More information about the Comp.unix mailing list