From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,a247b9f21a6d13d6,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-08-26 22:16:02 PST Path: gmd.de!rrz.uni-koeln.de!unidui!math.fu-berlin.de!fauern!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!darwin.sura.net!news-feed-2.peachnet.edu!news-feed-1.peachnet.edu!umn.edu!lynx.unm.edu!polaris.unm.edu!news-user From: espen@unm.edu (Peter Espen) Newsgroups: comp.sys.dec Subject: Our DEC Alpha is the slowest on this code .... Date: 26 Aug 1993 21:23:22 -0600 Organization: University of New Mexico, Albuquerque Distribution: usa Message-ID: <25juna$n5e@polaris.unm.edu> NNTP-Posting-Host: polaris.unm.edu Our company ports code to a lot of different unix systems. We have in the lab: IBM RS/6000 running AIX DEC Alpha running OSF/1 1.2 Motorola running 88open (88000 based) Apple Quadra 900 running A/UX 3.0 IBM PS/2 running AIX Sun Sparc running SunOS 4.xx and Solaris . etc. etc. We have come across some sort of weakness on the Dec Alpha that causes a real slowdown in execution speed. Even the Apple Quadra 900 running A/UX runs rings around the Alpha on the following little test program. Anyone know why? Here is the test program: /*********************************************************/ #include #include /* * Set RECSIZE to the size of each record ( up to 128 bytes ). * Set RECS to the number of writes. * Adjust them so that RECSIZE * RECS gives the desired size of file "foo". */ #define RECSIZE 13 #define RECS 5042 main() { int fd,i,val; char buf1[128]; char buf2[128]; /* Fill up a couple of bogus buffers to write out */ for( i = 0; i < RECSIZE; i++ ) { buf1[i] = 'X'; buf2[i] = 'O'; } unlink("./foo"); fd = open("./foo",O_CREAT|O_RDWR,0644); /* * Unbuffer stdout so I can see how fast things are printing out. */ setbuf(stdout,NULL); printf("creating file...\n"); for( i = 0; i < RECS; i++ ) { write(fd,buf1,RECSIZE); if ( !(i%100) ) /* print out every hundredth write. */ printf("%d ",i); } printf("\n"); printf("random access...\n"); for ( i = 0; i < RECS; i++ ) { val = rand()%RECS; lseek(fd,0,0); /* rewind the file then jump to a random offset */ lseek(fd,val*RECSIZE,0); write(fd,buf2,RECSIZE); if ( !(i%100) ) printf("%d ",val*RECSIZE); } printf("\n"); } /******************************************************************/ Here is the output of uname -a on the alpha: OSF1 jeremy 1.2 10 alpha If anyone has an idea of why the Alpha is so slow on this test code.... lets hear it! Thanks! Peter Espen espen@polaris.unm.edu