From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199606152333.QAA05589@koala.azstarnet.com> Date: Sat, 15 Jun 1996 16:33:59 -0700 From: David Mosberger-Tang Subject: Re: performance / f2c bug >>>>> On Sat, 15 Jun 1996 18:50:52 +0200 (MET DST), koenig@tat.physik.uni-tuebingen.de (Harald Koenig) said: >> Did you use "cc -std1"? Otherwise, you get tons of float->double >> and vice versa converstions. Harald> of course I did not. I just browsed the man page for Harald> "-std1" but couldn't find any pointer to this Harald> behaviour. anyway, this makes a big differece giving the Harald> same performace with DEC-cc (using f2c) now like with Harald> DEC-f77: Harald> where is this switch for gcc? gcc has the inverse switch: -traditional. gcc by default operates in ANSI mode, cc in K&R mode. Back in the old days (umh, is it really _that_ long?? ;-), C folks where to lazy to declare prototypes. As a result, the compilers had to be conservative and always pass arguments in the widest possible form (floats as doubles, char, short, and int as long). Similarly, all expression evaluation was done in the widest type (long & double, again). In other words, "float" used to make sense only for the purpose of saving memory. Maybe DEC can be convinced that the time has come to make -std1 the default? In case of doubt, objdump -S will tell it all... ;-) --david