Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Craig Burley <burley@tweedledumb.cygnus.com>
Subject: Re: gcc vs Dec Unix c
Date: 1998/01/09	[thread overview]
Message-ID: <y690spgu5r.fsf@tweedledumb.cygnus.com> (raw)
In-Reply-To: 695t9e$kft$1@agate.berkeley.edu


peterm@landau.EECS.Berkeley.EDU (Peter Mardahl) writes:

> I believe that x86 implements cos in HARDWARE, while Alpha does NOT.
> 
> Therefore, if you're doing cos() quite a lot, the x86 will stomp
> alpha, and most other RISC.

The former is true.  The latter does not follow.  Go read up on
computer architecture (see comp.arch and related FAQs for
starting in-line references) to find out why.  (There are *some*
operations that are best done "in hardware", by which you really
mean "via explicit instructions instead of using `ordinary'
instructions".  I don't *think* cos() is one of these.  An excellent
example of one would be bit-reverse, e.g. where bit_reverse(i), with
i being a 64-bit integer, returns a number j such that bit 0 of j
equals bit 63 of i, bit 1 of j equals bit 62 of i, and so on.
A less-certain example might be population count (returns the number
of `1' bits in i).  These sorts of instructions benefit from
low-level specialized hardware especially compared to traditional
low-level instructions like add, shift, and test.  CISC machines
were designed assuming there was a general advantage to "compressing"
the instruction stream that typically outweighed that of executing
a simpler instruction stream faster; RISC machines are designed
with the opposite general assumption, and the Alpha is a pretty
solid proof that it's true, for now, I believe.  But cos() is
*not* a low-level operation.)
-- 

"Practice random senselessness and act kind of beautiful."
James Craig Burley, Software Craftsperson    burley@gnu.org



  reply	other threads:[~1998-01-09  5:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-08  5:00 gcc vs Dec Unix c fonte
1998-01-09  5:00 ` Toon Moene
1998-01-09  5:00 ` Toon Moene
1998-01-09  5:00 ` Jaap Schellekens
1998-01-09  5:00   ` cekim
1998-01-09  5:00     ` Peter Mardahl
1998-01-09  5:00       ` Craig Burley [this message]
1998-01-10  5:00       ` cekim
1998-01-10  5:00         ` Craig Burley
1998-01-13  5:00           ` cekim
1998-01-13  5:00             ` Rob Komar
1998-01-13  5:00             ` Yan-Song Chen
1998-01-13  5:00               ` Greg Lindahl
1998-01-15  5:00               ` Lupo LeBoucher
1998-01-15  5:00                 ` Greg Lindahl
1998-01-13  5:00             ` Craig Burley
1998-01-13  5:00               ` [++] x86 FCOS (Was: Re: gcc vs Dec Unix c) Terje Mathisen
1998-01-13  5:00                 ` Andy Glew
1998-01-14  5:00                   ` Terje Mathisen
1998-01-13  5:00               ` gcc vs Dec Unix c James Van Buskirk
1998-01-14  5:00                 ` brianh
1998-01-14  5:00                   ` James Van Buskirk
1998-01-14  5:00             ` bmeyer
1998-01-15  5:00               ` cekim
1998-01-14  5:00     ` Donald K.Sinclair
1998-01-14  5:00       ` Rob Komar
1998-01-16  5:00         ` Torbjorn Lindgren
1998-01-17  5:00           ` Rob Komar
1998-01-14  5:00       ` cekim
1998-01-09  5:00 ` Toon Moene
  -- strict thread matches above, loose matches on Subject: below --
1998-01-13  5:00 Robert Harley
1998-01-14  5:00 ` cekim
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