[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: The no goto religion
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2007-08-02 18:48:15
Message-ID: 46B226EF.4000105 () acm ! org
[Download RAW message or body]

Henrique Pinto wrote:
> On Sun 29 Jul 2007 23:11, James Richard Tyrer wrote:
>> The "if" will require a conditional and then a jump.  It is possible
>> that the conditional will generate an additional short jump.  If the
>> second short jump is generated, it will make a considerable difference.
> 
> Not necessarily. Some architectures (notably IA64) support branch 
> predication, meaning that some ifs might not generate jumps at all.
> 
It is still a JUMP even if successfully predicted.  However, the JUMP 
out of a loop can never be predicted because prediction will always be 
to continue the loop since that is what happened previously.

OTOH, CPUs can do speculative execution of a branch so that there is no 
delay when the pipeline is flushed.  However, CPU resources are used for 
this that could otherwise be used for something else.

No free lunch.

-- 
JRT
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic