* int vs. long
@ 1999-07-30 18:39 Christopher T. Lansdown
1999-08-01 23:38 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Christopher T. Lansdown @ 1999-07-30 18:39 UTC (permalink / raw)
To: axp-list
Hi,
Is there a speed difference between dealing with ints and dealing
with longs on the Alpha? In this case I'm dealing with values guaranteed
to be too small for the range to matter, both will be sufficient. I'm
just wondering if longs will be at all faster since they're more natural
on the Alpha, being a word and all. Is there any truth to that?
Oh, on another note, how much of a speed hit is a cast from
int (long) to float? Thanks.
-Chris
--
lansdoct@cs.alfred.edu
"If I had had more time I would have not written you at all." - Pascal
Linux Programs: http://cs.alfred.edu/~lansdoct/linux/
Linux - Get there. Today.
Evil Overlord Quote of the Day:
150.I will provide funding and research to develop tactical and strategic
weapons covering a full range of needs so my choices are not limited to
"hand to hand combat with swords" and "blow up the planet".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: int vs. long
1999-07-30 18:39 int vs. long Christopher T. Lansdown
@ 1999-08-01 23:38 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 1999-08-01 23:38 UTC (permalink / raw)
To: axp-list
On Fri, Jul 30, 1999 at 02:39:21PM -0400, Christopher T. Lansdown wrote:
> Is there a speed difference between dealing with ints and dealing
> with longs on the Alpha?
Yes. It ought to be small, but present. Comparisons, for instance,
have to be done as longs; most of the time the compiler can figure
out that the ldl or addl has produced a proplerly sign-extended value,
but sometimes not.
> Oh, on another note, how much of a speed hit is a cast from
> int (long) to float? Thanks.
ev6 is relatively cheap -- one gr->fr move, and then one convert
insn. Probably 5 cycles latency max. Pre-ev6, no gr->fr move so
have to store+load from memory. Call it 9 cycles?
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-08-01 23:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-07-30 18:39 int vs. long Christopher T. Lansdown
1999-08-01 23:38 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox