From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,77a58b5f0a1b1acc X-Google-Attributes: gid111c93,public From: conrad@hive.me.gu.edu.au (Conrad Sanderson) Subject: Re: Very dissapointing results with GCC (EGCS) compiler Date: 1998/10/27 Message-ID: #1/1 X-Deja-AN: 405437336 References: <36352543.7C380B7A@worldnet.att.net> Organization: Griffith University, Brisbane, Australia Newsgroups: comp.os.linux.alpha On 27 Oct 1998 01:45:57 GMT, Peter Doering wrote: > I just compiled POVray 3.01 on my Alpha system (21164 533 Mhz), LX > board, 64MB Ram, Redhat Linux 5.1) and compared the results with the > ... > Then I finally could compile it with adding: > -O -mieee > > with higher optimisation settings -O2 and -O3 i got an compiler error > message (signal 6). Without the -mieee switch i could compile it but it > immediately generated a "floating point exception" and dumped core. Try -funroll-all-loops as well. This will generate larger code, but it will run noticeably faster. The -O option is just a "better than nothing" optmization. The -O2 and -O3 enable a whole multitude of other optimizations, which can be turned on individually. See the man page for gcc or look at the TexInfo documentation (really only readable via KDE's Help browser). That way you can find which optimization is causing the compiler problem and send off an bug report to the EGCS folk. > ... >the Windows NT version just needs 20 seconds !!!!! to render the same >file with the same resolution and settings which makes the egcs compiler >output look like a snake. > >Is this just due to the -mieee compiler setting or is the egcs compiler >not mature (to say the least) enough on the alpha platform under Linux >????? There are 3 seperate problems why Alpha/Linux egcs compiled code is slow: 1) the math library used by egcs is VERY SLOW. You can get a much faster version at: http://people.frankfurt.netsurf.de/Joachim.Wesner/ Compile libffm and when compiling povray, link it with libffm. (eg. assuming libffm.a is in the current directory: gcc stuff.c -o stuff -L. -lffm) 2) the quality of the code generated by EGCS for the Alpha is not in the same league as Digital UNIX C on Alpha or EGCS on Intel. 3) The -mieee is needed becuase of the way the povray code is written. It (correctly?) assumes that the target machine is fully IEEE math conformant. The Alpha chip supports a subset of the IEEE math standard "for performance reasons". This seems like a oxymoron in retrospect. If you had the urge for it, You could modify the povray code to add some checks in right places and hence compile without -mieee. -- Conrad Sanderson - Microelectronic Signal Processing Laboratory Griffith University, Queensland, Australia http://spl.me.gu.edu.au [ under construction ]