* Some C questions
@ 1999-09-19 6:17 Christopher T. Lansdown
1999-09-19 21:23 ` Richard Henderson
0 siblings, 1 reply; 4+ messages in thread
From: Christopher T. Lansdown @ 1999-09-19 6:17 UTC (permalink / raw)
To: axp-list
Hi,
I've got two questions pertaining to Alpha optimizing C:
1. Is the && operator easily implemented in the Alpha so that it's
significantly faster than
if(a)
if(b)
code...
(I am assuming so, I just want to be sure)
2. Does gcc implement the speculative execution hints that the Alpha has
available? If so, does anyone know what the rules are on how they're set?
Are they set for regular if statements so that if we know that one is more
likely than the other we know to put it in the if{} or the else{} part?
Thanks,
-Chris
--
lansdoct@cs.alfred.edu
"If I had had more time I would have written a shorter letter." - Pascal
Linux Programs: http://cs.alfred.edu/~lansdoct/linux/
Linux - Get there. Today.
Evil Overlord Quote of the Day (www.eviloverlord.com):
99. Any data file of crucial importance will be padded to 1.45Mb in size.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Some C questions
1999-09-19 6:17 Some C questions Christopher T. Lansdown
@ 1999-09-19 21:23 ` Richard Henderson
1999-09-19 22:20 ` Christopher T. Lansdown
0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 1999-09-19 21:23 UTC (permalink / raw)
To: axp-list
On Sun, Sep 19, 1999 at 02:17:25AM -0400, Christopher T. Lansdown wrote:
> 1. Is the && operator easily implemented in the Alpha so that it's
> significantly faster than
> if(a)
> if(b)
> code...
> (I am assuming so, I just want to be sure)
Assuming b does not have side effects, yes.
> 2. Does gcc implement the speculative execution hints that the Alpha has
> available?
I have no idea what you're talking about.
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Some C questions
1999-09-19 21:23 ` Richard Henderson
@ 1999-09-19 22:20 ` Christopher T. Lansdown
1999-09-19 22:35 ` Daniel Potts
0 siblings, 1 reply; 4+ messages in thread
From: Christopher T. Lansdown @ 1999-09-19 22:20 UTC (permalink / raw)
To: axp-list
> > 2. Does gcc implement the speculative execution hints that the Alpha has
> > available?
>
> I have no idea what you're talking about.
Aren't there hints that are possible to encode into certain branch
instructions to aid branch-prediction logic? I've seen that referenced in
several manuals on the Alpha, some of which were on DEC's site.
-Chris
--
lansdoct@cs.alfred.edu
"If I had had more time I would have written a shorter letter." - Pascal
Linux Programs: http://cs.alfred.edu/~lansdoct/linux/
Linux - Get there. Today.
Evil Overlord Quote of the Day (www.eviloverlord.com):
99. Any data file of crucial importance will be padded to 1.45Mb in size.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Some C questions
1999-09-19 22:20 ` Christopher T. Lansdown
@ 1999-09-19 22:35 ` Daniel Potts
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Potts @ 1999-09-19 22:35 UTC (permalink / raw)
To: axp-list
On Sun, 19 Sep 1999, Christopher T. Lansdown wrote:
> > > 2. Does gcc implement the speculative execution hints that the Alpha has
> > > available?
> >
> > I have no idea what you're talking about.
> Aren't there hints that are possible to encode into certain branch
> instructions to aid branch-prediction logic? I've seen that referenced in
> several manuals on the Alpha, some of which were on DEC's site.
> -Chris
You mean the jump instructions jmp, jsr, ret.. They have hints associated
with them, branch instructions do not. Branch instructions have hints
based on the type of branch you call. I don't know how gcc does it
however, objdump a small piece of code and find out :)
Dan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-09-19 22:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-19 6:17 Some C questions Christopher T. Lansdown
1999-09-19 21:23 ` Richard Henderson
1999-09-19 22:20 ` Christopher T. Lansdown
1999-09-19 22:35 ` Daniel Potts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox