Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: David Mosberger-Tang <davidm@AZStarNet.com>
Subject: Re: performance of 21164-300 vs P6-200
Date: Tue, 11 Jun 1996 08:07:51 -0700	[thread overview]
Message-ID: <199606111507.IAA08918@koala.azstarnet.com> (raw)

>>>>> On Tue, 11 Jun 1996 09:58:30 -0400 (EDT), Jim Nance <Jim_Nance@avanticorp.com> said:

  Jim> 2) Your program makes extensive use of float data types.  I
  Jim> have found that RISC processors handle floats poorly compared
  Jim> to doubles.  This was certainly a supprise to me the first time
  Jim> I noticed it, and its certainly not what I was taught in
  Jim> school.

Is this because the program uses a lot of libm calls so that it ends
up converting between float and double all the time?  The float
operations themselves certainly are _not_ slower on the Alpha: all fp
operations have a latency of 4 cycles on the 21164 except for the
divider which has a data-dependent latency in the range of 15..31
cycles for single-precision and 22..60 cycles for double-precision.

If the problem is really due to extraneous conversions, it might be
worthwhile to try the libm that comes with glibc---it has *f variants
of all the libm functions.  Those variants operate on single-precision
floats only.  As long as an ANSI C compiler is used, this should give
performance at least as good as with double.  E.g., to compute a
single precision since, you'd call sinf() instead of sin().

	--david

             reply	other threads:[~1996-06-11 15:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-11 15:07 David Mosberger-Tang [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-06-12 20:21 performance of 21164-300 vs P6-200 Bill Broadley
     [not found] <199606101248.VAA21609@atlas.rc.m-kagaku.co.jp>
1996-06-11 13:58 ` Jim Nance
read-only archive

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