as to opinions if this would result in general optymisations - some say no (and they belive compiler produce code better than you do) - some say yes (and they say that still compiler are silly to produce uneffective
code sometimes -
Why does the compiler make float to int as fast as the assembly code i got from www.musicdsp.org ?
So having ASM is needed in my opinion.
Also its very handy if you program microcontrollers.
If you still haven't gotten that point by now, perhaps you are trolling us.
Let me tell like this : i have tested all this, get the time, repeat 1000 times, then get the time again.
Test showed me the simplest if was faster then functions, it was a while ago, i should test it again on my new pc maybe ?
Can a i7 be faster with sin() instead of a lookuptable? , and maybe a Celeron ( which is my current game development pc with onboard graphics ) cant ?
If you are asking this, you are in absolutely no position to be worrying about whether branching is faster than a math operation or not. You need a really thorough understanding of what is going on under the hood of your compiler if you want micro-optimisations to be anything other than a total waste of time.
If i worry about optimalization,i must be in some position, right ?
I have learned programming not on school, i also dont know how to use a debugger.
Is that a problem ?, i thought questions are never dumb, i skip learning everything that is not needed to get result, if i need something i can Always ask it.
But if you defending your own business, ofcourse you dont wanto tell the competition how to get your games optimized,
i,m telling you : games are not playable with functions like sin() and cos() and sqrtf() ( i still need to get some fast sqrtf function by the way ).
Note : i,m Always having 1000 bullets and explosions in screen, so maybe this does not count for your i7 pc with 2 bullet and 1 explosion ?