Re: write statement output buffer flush off on Sun
From: James Van Buskirk (not_valid_at_comcast.net)
Date: 03/30/04
- Next message: jan van oosterwijk: "Re: Trapping SYSTEM Call Output"
- Previous message: jan van oosterwijk: "Re: DIMENSION (N,*)"
- In reply to: James Giles: "Re: write statement output buffer flush off on Sun"
- Next in thread: glen herrmannsfeldt: "Re: write statement output buffer flush off on Sun"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Mar 2004 20:17:48 GMT
"James Giles" <jamesgiles@worldnet.att.net> wrote in message
news:e3kac.2743$He5.65439@bgtnsc04-news.ops.worldnet.att.net...
> All this is irrelevant in the case where the alternate return is done
> in the callee. In that case, the usual return has not alternatives to
> select from at all. It looks just like a normal return. There are
> no tests or other conditional activities in either the caller or the
> callee that need to be done in any order or that need to rely on
> any form of branch prediction, speculative execution, or anything
> else. The normal return is a normal return.
> In the case of the exceptional return being taken, the callee rolls
> up the stack properly and returns to the caller directly at the
> alternate point. Again, no speculation, conditional choices,
> or anything else. The return look just like a normal return
> except that the return address is different. All the choices have
> already been made inside the procedure when it chooses what
> RETURN statement to execute. And that's done with the normal
> conditional statements of the language (IFs, CASEs, etc.).
I think I can see what you're talking about here, although it
took a couple of readings. If the alternate return is infrequent
it would have been mispredicted every time if it were an infrequent
branch of an IF or SELECT CASE, so it wouldn't lead to performance
loss relative to a caller-implemented mechanism.
The only instance where performance loss would occur would then
be if one of the alternate returns were the rule rather than the
exception in which case only a processor that didn't maintain
a return stack (like a Pentium Classic) would start predicting
the right branch while a more contemporary processor (like a
Pentium MMX, even) that uses a hardware return stack for branch
prediction would mispredict every time the alternate returns if
implemented by the mechanism you suggest because the return
address would never match the address pushed on the (programmer-
invisible) return stack.
-- write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, & 6.0134700243160014d-154/),(/'x'/)); end
- Next message: jan van oosterwijk: "Re: Trapping SYSTEM Call Output"
- Previous message: jan van oosterwijk: "Re: DIMENSION (N,*)"
- In reply to: James Giles: "Re: write statement output buffer flush off on Sun"
- Next in thread: glen herrmannsfeldt: "Re: write statement output buffer flush off on Sun"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|