[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::atarist

Title:Atari ST, TT, & Falcon
Notice:Please read note 1.0 and its replies before posting!
Moderator:FUNYET::ANDERSON
Created:Mon Apr 04 1988
Last Modified:Tue May 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1433
Total number of notes:10312

512.0. "Sieve Benchmark" by LEDS::ACCIARDI () Wed Jun 21 1989 02:20

    Can someone compile the following program and report what the results
    are on the ST?  A friend and I are benchmarking various Amigae with
    68000 @7.2 MHz, 68020 @ 7.4/14.4 MHz, and numerous VAXen and PC clones
    of the 286/386 variety.  The results are quite interesting, and it
    would be neat to see where the ST falls in.  (Hint:  the 286/386
    machines are not nearly as fast as they're hyped to be.)
    
    Thanks.  Ed.
    
    
/*
 *   Sieve Benchmark
 */  

#include <stdio.h>

#define size 8190
#define LOOP 100
#define TRUE 1
#define FALSE 0


int tblock[4];
char flags[size+1];


long start,end;


main()
{
int i,prime,count,k,iter;

puts("Sieve Benchmark\n");
printf("%d iterations: ",LOOP);

time(&start);

for(iter = 1 ; iter <= LOOP ; iter++) {
   count=0;
   for(i = 0 ; i <= size ; i++)
      flags[i] = TRUE;
   for(i = 0 ; i <= size ; i++) {
      if(flags[i]) {
         prime = i+i+3;
         for(k = i+prime ; k <= size ; k+= prime)
            flags[k] = FALSE;
         count++;
      };
   };

};

time(&end);

printf("%d seconds\n",end-start);

}
T.RTitleUserPersonal
Name
DateLines
512.1several good benchmarks available...3230::KRUYThere Ain't No JusticeWed Jun 21 1989 03:3512

	To do this right, you should use several different benchmarks,
	not just the Sieve of Erathostanes.  Different benchmarks will
	exploit different capabilities of the systems, so while one
	might excell in the sieve benchmark, it might do very poorly
	in one that would be more i/o intensive, or use floating point,
	or use a lot of dynamic memory, etc...

					IMHO,

					-sjk
512.2LEDS::ACCIARDIWed Jun 21 1989 12:398
    
    Well noted.  We also have a Whetstone benchmark which I don't have the
    source to... yet.
    
    It's important to take this stuff with a strong pinch of salt.  These
    benchmarks measure compiler efficiency as much as anything else.
    
    Ed.