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="Seebs, post: 4214671"] While this is true, I've seen some cleverness. One of the geo random number generators replaced: if (x) { y += z; } with y += (z * x); (where x was necessarily 0 or 1) and got a VERY noticeable performance improvement. That is generally the path to take for stuff like this, if your compiler isn't clever enough to do what you mean. (In particular, a compiler which produces multiple branches in the absence of side effects is not thinking as clearly as it should, on a system where branches are expensive.) -s [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Short-circuiting in C
Top