Editing BoostC Optimizations
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 130: | Line 130: | ||
left empty or there is no value in using it and will actually result in longer code. | left empty or there is no value in using it and will actually result in longer code. | ||
− | + | CODE | |
− | + | (test)?(result=1):(result=0); | |
VS | VS | ||
− | + | CODE | |
− | + | if(test) | |
− | + | { | |
− | + | result=1; | |
− | + | } | |
− | + | else | |
− | + | { | |
− | + | result=0; | |
− | + | } | |
Line 151: | Line 151: | ||
For code like that, I would expect this: | For code like that, I would expect this: | ||
+ | CODE | ||
+ | result = (test ? 1 : 0) | ||
+ | to do better, but it doesn't, either... | ||
+ | |||
+ | |||
+ | |||
+ | For code like that, I would expect this: | ||
+ | CODE | ||
+ | result = (test ? 1 : 0) | ||
+ | to do better, but it doesn't, either... | ||
− | |||
− | |||