Path: utzoo!utgpu!watserv1!watmath!ria!uwovax!7103_2622 From: 7103_2622@uwovax.uwo.ca (Eric Smith) Newsgroups: comp.sys.atari.st Subject: Re: GNU C Floating Point Math Message-ID: <4470.257da18c@uwovax.uwo.ca> Date: 7 Dec 89 04:32:28 GMT References: <3497@jhunix.HCF.JHU.EDU> <1989Dec4.210245.2798@usenet.ins.cwru.edu> <3526@jhunix.HCF.JHU.EDU> Lines: 30 In article <3526@jhunix.HCF.JHU.EDU>, esp_05@jhunix.HCF.JHU.EDU (Stdnt 05) writes: > I just downloaded the copy of GNU C from terminator, oh, two weeks > ago, the same time I downloaded the pml package. Maybe I should try > drgsun. > Yes, dsrgsun has slightly more up to date versions. > At any rate Megamax C blew GNU C away in speed and executable size > (GNU C took twice as long, and the executables were around twice as > large). The only problem with it is that it doesn't have stdlib > functions, although without those I can still improvise. GNU C executables are twice as large only for small files (the library is more complicated, and not as well organized, so it has higher overhead). For larger files I would expect the GCC to produce smaller code. And yes, GNU takes longer to compile; Laser is *really* fast. On the other hand, programs compiled with GNU execute faster, and the GNU optimizer is a *lot* smarter than Megamax's (GNU knows not only when to put things in registers, but also how to change multiplications into additions inside of loops, so that "for (i = 0; i < end; i++) a[i]=foo(i);" produces the same code as "for (p = a; p < a[end]; ++p) *p++ = foo(p-a);". One other note: the library as distributed has a serious bug in the compare routine for floats. That should be fixed soon; a temporary workaround is to use doubles instead of floats. This may have been causing your problems. -- Eric R. Smith email: Dept. of Mathematics ERSMITH@uwovax.uwo.ca University of Western Ontario ERSMITH@uwovax.bitnet London, Ont. Canada N6A 5B7 ph: (519) 661-3638