From: hobbs@steven.zko.dec.com (Steven Hobbs)
Subject: Re: (System) cost of using alpha rounding mode instructions
Date: 1995/09/08 [thread overview]
Message-ID: <42o4g2$hpc@nntpd.lkg.dec.com> (raw)
In-Reply-To: Pine.OSF.3.90.950906163137.12846A-100000@tony.cs.cofc.edu
In article <Pine.OSF.3.90.950906163137.12846A-100000@tony.cs.cofc.edu>,
"Anthony P. Leclerc" <leclerc@tony.cs.cofc.edu> writes:
>I am using the rounding mode instructions as part of the Alpha
>architecture (e.g. addtm, addtd, multm, multd, ....).
..
[details about poor performance on Alpha when using various rounding modes]
..
>The profiler tells me that the alpha program only took 10 seconds. Using
>"time" I verfied that, sure enough, the user time was about 10 seconds,
>but the system time was around 3 minutes!
>
>Basically I'm wondering what I may be doing wrong. The inline assembly
>seems pretty straight forward, and I even seperated out the assembly
>instructions into a seperate file, rather than inlining. It seems from a
>profile, that the timings are reasonable. However, the enourmous system
>time (about 25 times the cost of the user computation time) is
>distressing. Any ideas?
The Alpha architecture states:
An implementation that includes IEEE floating-point may subset the
ability to perform rounding to plus infinity and minus infinity. If
not implemented, instructions requesting these rounding modes take
Illegal Instruction Trap.
The 21064 Alpha chip took this option. When you do a round-to-infinity
floating point operation, the instruction will trap to the operating
system and the operating system will emulate the operation in software.
Therefore, programs that do a lot of infinity rounding will use a lot
of system time. Round-to-nearest and chopped-rounding execute in
hardware on a 21064.
Analysis showed that very few programs ever use infinity rounding. Those
few programs that do some infinity rounding, usually only use it for
a couple of instructions, with most other instructions using
round-to-nearest or chopped. You seem to have one of the very rare
programs that needs to do infinity rounding most of time.
Your program will run much better on a 21164 Alpha chip. This Alpha
implementation chose to do all four IEEE rounding modes in hardware.
(I assume that infinity rounding was subsetted out of the 21064 design
in order to make the chip available sooner. The prototype Alpha chip
that Digital used internally before the 21064 was ready had no floating
point at all. When the prototype chip was upgraded to the product chip,
floating point was one of the big additions. I would assume that most
future Alpha chips will include all of the rounding modes).
prev parent reply other threads:[~1995-09-08 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-09-06 4:00 (System) cost of using alpha rounding mode instructions Anthony P. Leclerc
1995-09-08 4:00 ` Steven Hobbs [this message]
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