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="Edward A. Falk, post: 4215975"] See my previous post. OP is working with a cpu that doesn't have multiple threads of execution, per se, but does have parallel threads of computation. Imagine: a = x1 * x2 + x3; b = y1 * y2 + y3; c = z1 * z2 + z3; I've worked on a CPU that could compute those three expressions in perfect parallel. We made sure our compiler recognized cases like this and optimized accordingly. I think OP's problem is that the (a && b && c) short-circuiting is preventing the compiler from computing those values in parallel. That's really a failure on the compiler's part, but OP is hoping there's a way to hint to the compiler that short-circuiting is not necessary. And yes, without extending the language, there's no way to *force* the compiler to compute that stuff in parallel. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Short-circuiting in C
Top