* (System) cost of using alpha rounding mode instructions
@ 1995-09-06 4:00 Anthony P. Leclerc
1995-09-08 4:00 ` Steven Hobbs
0 siblings, 1 reply; 2+ messages in thread
From: Anthony P. Leclerc @ 1995-09-06 4:00 UTC (permalink / raw)
I am using the rounding mode instructions as part of the Alpha
architecture (e.g. addtm, addtd, multm, multd, ....).
At first (and maybe still) I thought DEC was clever in introducing these
seperate instructions in order to do directed rounding, rather than call
a seperate instruction to set a control register before ordinary "add",
"mult", etc. instructions. However, now I'm wondering what the cost is.
All architectures I have worked on previously used the seperate
instruction (to change a value in the rounding control register) method
for permitting IEEE recommend (or is it required now) directed rounding.
The timings for the interval arithmetic software I was using seemed
reasonable (on an Ultrix box, for instance).
On an Alpha, I'm finding out that a simple interval arithmetic program which
runs in 20 seconds on a DEC 5000/240 takes over 3 minutes to run on a DEC
3000/400 with 64 M. I have subsequently done profiling to try to get a
handle on this problem.
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?
Please send me email about this. I don't have convenient or regular
access to news.
|"""""|
( @ @ )
+----------------------.ooo0----(_)----0ooo.---------------------+
| |
| *** http://www.cs.cofc.edu/per/fac/leclerc/WWW/apl.html *** |
| |
| .ooo0 |
| ( ) 0ooo. |
+---------------------------\ (----( )-------------------------+
\_) ) /
(_/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (System) cost of using alpha rounding mode instructions
1995-09-06 4:00 (System) cost of using alpha rounding mode instructions Anthony P. Leclerc
@ 1995-09-08 4:00 ` Steven Hobbs
0 siblings, 0 replies; 2+ messages in thread
From: Steven Hobbs @ 1995-09-08 4:00 UTC (permalink / raw)
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).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1995-09-08 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-09-06 4:00 (System) cost of using alpha rounding mode instructions Anthony P. Leclerc
1995-09-08 4:00 ` Steven Hobbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox