Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: performance / f2c bug
@ 1996-06-15 23:33 David Mosberger-Tang
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger-Tang @ 1996-06-15 23:33 UTC (permalink / raw)


>>>>> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <199606142246.PAA00752@koala.azstarnet.com>]

end of thread, other threads:[~1996-06-15 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-06-15 23:33 performance / f2c bug David Mosberger-Tang
     [not found] <199606142246.PAA00752@koala.azstarnet.com>
1996-06-15 16:50 ` Harald Koenig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox