[net.micro.amiga] Another Challenge

richr@iddic.UUCP (Rich Rodgers) (10/24/85)

From: richr 
> Article 334 of net.micro.amiga:
> 
> Some Facts:
> The Amiga reads a 32K file in   4.39 seconds
> The Amiga writes a 32K file in  6.20 seconds
> The Amiga draws                 142,020 pixels/second
> 
> A Challenge
>      Do the following tests on your favorite computer, and POST the results.
>      May the best computer win!!!

No one has yet offered any response to my challenge! We are particularly
interested in seeing how the Atari does on this benchmark, given the
preponderance of subjective claims foating around.

I hope someone can take the time to run these and post the results,
rather than continue to fan the flames of speculation that flood 
these groups. I can only assume that they have not yet appeared because
no one has bothered to do it, rather than because of the results they
achieved. Of course, I have been known to be wrong on occasion...

					Richard Rodgers
					tektronix!iddic!richr

PS: Perhaps I should post the sources in Basic....

> 
> The Algorithms:
> 
> The following algorithm was done on the Amiga with the native Lattice C
> Compiler.  It writes 64 512 byte buffers, then reads 64 512 byte buffers.
> 
> for (i = 0; i < 512; i++) p[i] = 'a';
> fp = fopen("df0:data", "w");
> CurrentTime(&Seconds, &Micros);
> for (i = 0; i < 64; i++)
>   nact = fwrite(p, 512, 1, fp);
> ret = fclose(fp);
> CurrentTime(&Seconds2, &Micros2);
> printf("%d %d %d %d", Seconds, Seconds2, Micros, Micros2);
> 
> fp = fopen("df0:data", "r");
> CurrentTime(&Seconds, &Micros);
> for (i = 0; i < 64; i++)
>   nact = fread(p, 512, 1, fp);
> ret = fclose(fp);
> CurrentTime(&Seconds2, &Micros2);
> printf("%d %d %d %d", Seconds, Seconds2, Micros, Micros2);
> 
>alternate source:  
> Algorithm:
> /* draw 8000 vectors of 200 pixels long with a skew. set by offset */
>  
> x1 = 100 - offset;
> y1 = 100
> x2 = 100 + offset
> y2 = 300
>  
> for (i = 0; i < 20; i++) {
>         PenPat(black);
>         for (j = 0; j < 200; j++) {
>                 MoveTo(x1, y1);
>                 LineTo(x2, y2);
>                 x1++;
>                 x2++;
>         }
>         PenPat(white);
>         for (j = 0; j < 200; j++) {
>                 MoveTo(x1, y1);
>                 LineTo(x2, y2);
>                 x1--;
>                 x2--;
>         }
> }
>  

-- 
				Rich Rodgers

				tektronix!iddic!richr

frank@sagan.UUCP (Frank Whaley) (10/28/85)

In article <2259@iddic.UUCP>, richr@iddic.UUCP (Rich Rodgers) writes:
> > Some Facts:
> > The Amiga reads a 32K file in   4.39 seconds
> > The Amiga writes a 32K file in  6.20 seconds
> > The Amiga draws                 142,020 pixels/second
> > 
> > A Challenge
> >      Do the following tests on your favorite computer, and POST the results.
> >      May the best computer win!!!
> No one has yet offered any response to my challenge! We are particularly
> interested in seeing how the Atari does on this benchmark, given the
> preponderance of subjective claims foating around.

Not all benchmarks are created equal...

Perhaps not everyone responds to a challenge in the same way -- I tried the
given algorithm (Lattice C and my own library) on my IBMPC and found that
my IBMPC:
	writes a 32K file in	14.28 seconds
	reads a 32K file in	13.45 seconds
	/*  all times given for standard floppy disk  */

However, if I twiddle my disk buffers around, my IBMPC:
	writes a 32K file in	14.28 seconds
	reads a 32K file in	 2.96 seconds

This led me to rewrite the algorithm to take advantage of the many layers
of disk buffering I use:

	write(fd, p, 0x8000);	/*  the hard way...  */
	read(fd, p, 0x8000);

With the new algorithm, I find that my IBMPC:
	writes a 32K file in	2.41 seconds
	reads a 32K file in	1.43 seconds

My point is simple -- most benchmark programs have little relation to
"real world" problems.  I would never use fwrite()/fread() nor 512 byte
blocks if I wanted to write or read a file in a hurry.  (:-)
-- 
frank
... Frank Whaley, MicroPro Product Development
{dual,hplabs,glacier,lll-crg}!well!micropro!sagan!frank

	"The heights by great men reached and kept,
	 were not attained by sudden flight.
	 But they, while their companions slept,
	 were toiling upward in the night."
			-Longfellow

howard@amdahl.UUCP (Howard C. Simonson) (10/31/85)

I suppose I also find it interesting that no one has responded to your request
for benchmarks.  Could it be that the speed at which lines can be drawn
on the screen isn't important.  Doesn't everybody buy a computer to access a
32K file as fast as possible?  Hmm, maybe people really buy these machines
( and their software ) to acomplish a task, to get their work done, or just
plain enjoyment.  Definitely a radical concept.  This will all come clear to
you once there is software available for your machine too.
-- 
Time for a new catchy phrase in my                           Howard C. Simonson
 .signature, now if I could only     ...{dragon,hplabs,ihnp4,nsc}!amdahl!howard
  think of one...

[ Opinion? What opinion.  I think you have the wrong guy... ]