hacking_again
Joined 9 years ago
Joined 9 years ago
you could always lower sales tax and raise income tax
It will feel slow at first, but you will learn more quickly overall.
Don't get me wrong, I don't particularly like having my picture taken without my explicit consent. In the end, consent is all rather arbitrary because it's not like you can choose not to live in human society on Earth.
There's an example on SO, I got similar results just now when I replicated it:
https://stackoverflow.com/questions/15596318/is-it-better-to...
It doesn't matter on my machine whether the divisor is 10 or 42 (as in the example), the branching is way faster. Now, maybe if the branching were not in a loop and hence not so easily predicted, it wouldn't make a difference. But if this code is not being used in a loop, optimization may be premature anyway (as indicated in my original comment).
Probably f() has something to do inside the main game loop and gets called on a bunch of objects every frame. I haven't looked at the code enough to know if that's a bottleneck.