Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: cekim@ix.netcom.com
To: cekim@ix.netcom.com
Subject: Re: gcc vs Dec Unix c
Date: 1998/01/10	[thread overview]
Message-ID: <884411893.151322629@dejanews.com> (raw)
In-Reply-To: 695t9e$kft$1@agate.berkeley.edu


In article <695t9e$kft$1@agate.berkeley.edu>,
  peterm@landau.EECS.Berkeley.EDU (Peter Mardahl) wrote:
>
> In article <884364975.2133262340@dejanews.com>,  <cekim@ix.netcom.com> wrote:
> !In article <694nm1$74c$1@news2.xs4all.nl!,
> !  schj@xs1.xs4all.nl (Jaap Schellekens) wrote:
> !
> !I can tell you that the cos() function is one that is particularly slow
> !in linux.  I ran a loop using this very trivially 100 million times on an
> !164LX and a PPRO200.  The PPRO with the -O flag took 1 min, 6 sec.
> !
> !The alpha (533MHz LX)took 6 min,53 sec!!!!
> !
> !Take the cos() out and run with the fp adds and multiplies in this loop
> !that keep things moving, and those number change to 3 sec for the alpha
> !and 4 sec for the PPRO.
> !
> !SO!. there is obvisouly a problem with the cos() function!!!
>
> 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.

You are quite correct(FCOS in TASM), I completely forgot about
that(hardware implimentation in x86). I never worked too much with x86 fp
at assembly level and certainly not recently.  I should have realized
such a gap could have only come from hard vs soft code.  Never expected
such a thing in a RISC, of course.

One thing that threw me off of that trail is that the ".s" assembly dump
has "call cos" instead of the TASM or AT&T equivalent "FCOS".  I assume
Gcc just replaces this with the appropriate code or macro according to
the host architecture.

SO:
 Oops!! and ouch!!  (in terms of performace)

Live, learn, forget, relearn, die :)

I'll stop posting late at night to prevent such errors in the future.

/Mike

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet



  parent reply	other threads:[~1998-01-10  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 ` 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
1998-01-10  5:00       ` cekim [this message]
1998-01-10  5:00         ` Craig Burley
1998-01-13  5:00           ` cekim
1998-01-13  5:00             ` Craig Burley
1998-01-13  5:00               ` James Van Buskirk
1998-01-14  5:00                 ` brianh
1998-01-14  5:00                   ` James Van Buskirk
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 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             ` Rob Komar
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
  -- 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