From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 1238 invoked from network); 24 Jun 1998 08:51:32 -0000 Received: from david.siemens.de (192.35.17.14) by mail2.redhat.com with SMTP; 24 Jun 1998 08:51:32 -0000 X-Envelope-Sender-Is: martin.kahlert@mchp.siemens.de (at relayer david.siemens.de) Received: from salomon.mchp.siemens.de (salomon.siemens.de [139.23.33.13]) by david.siemens.de (8.9.0/8.9.0) with ESMTP id KAA24782; Wed, 24 Jun 1998 10:50:26 +0200 (MET DST) Received: from keksy.mchp.siemens.de (kahlert@keksy.mchp.siemens.de [139.23.187.70]) by salomon.mchp.siemens.de (8.8.8/8.8.5) with ESMTP id KAA13973; Wed, 24 Jun 1998 10:50:59 +0200 (MDT) Received: (from kahlert@localhost) by keksy.mchp.siemens.de (8.8.8/8.8.8) id KAA06049; Wed, 24 Jun 1998 10:51:03 +0200 Date: Wed, 24 Jun 1998 10:51:03 +0200 From: Martin Kahlert Message-Id: <199806240851.KAA06049@keksy.mchp.siemens.de> To: egcs@cygnus.com Subject: Performance measurements Cc: axp-list@redhat.com Hi, i tried to compare different compilers on my numerical code. Therefore i extracted a FPU intensive function and surrounded it with a loop while measuring the execution time. I will provide the source and the Makefile at the end of this mail. I work on a Linux 2.0.34 SMP Kernel (libc5). My hardware is a dual Pentium Pro 200MHz system with 128MB RAM. pgcc is the portland group compiler and tcc the free Tendra compiler system (from http://alph.dera.gov.uk/TenDRA/) Here are my results: %> make pgcc: 90.11 MFLOPS gcc-2.7.2.1: 95.46 MFLOPS gcc-without double align: 23.52 MFLOPS egcs-2.91.42: 69.96 MFLOPS tcc: 92.33 MFLOPS - The difference -malign-double makes on gcc-2.7.2.1 is very impressive. On egcs it doesn't change the result. - egcs seems to produce worse code than gcc-2.7.2.1 - During my experience, pgcc produces very good code and is very reliable. The code usually runs about 25% faster than egcs-code. - For tcc i have to say, that the result is very dependent on the order, you declare the variables: If you put the declarations int i,j; and double *wksph=wksp+n/2; in front of the one for c[], the result drops down to 24.70 MFLOPS. For all other compilers, this doesn't make much difference. Could anybody comment on that? If anyone is interested in the asm code that pgcc produces, i can send it offline (388 lines of asm statements are too long for the list) For the axp list: It would be very kind, if anybody could provide some values for a Linux Alpha (e.g. 533MHz) for comparison. Thanks in advance, Martin Here is the testfile m.c: #include #include #include #include #include #define N 1024 void trafo(double *a,const int n,double *wksp,double *const ops) { double c[]={ 3.52262918857095333469e-02, -8.54412738820266443041e-02, -1.35011020010254584323e-01, 4.59877502118491543470e-01, 8.06891509311092547385e-01, 3.32670552950082631938e-01 }; int i,j; double *wksph=wksp+n/2; if(n<6) return; for(i=j=0;i