Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Short-circuiting in C
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Eric Sosman, post: 4216749"] In a purely sequential model, only the accuracy of the branch prediction will make any difference. Either way you write the code, you will take exactly one branch if there's an `else', zero or one branches if not. You'll take the same number of branches with `&&' as with `&' or a variant; the only difference is in how many branches you'll execute but not take. If they're usually not taken but usually predicted to be taken, all I can say is your compiler doesn't predict very well and should get a job doing weather forecasts. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Short-circuiting in C
Top