Quote:
Originally Posted by Sylwester
Firippu you are wrong about method 2 being better.
It makes no difference in efficiency, but you can use it to make your code easier to read.
|
Actually, method #2 is a bit more efficient because it would only use 1 return statement at the end, if it used one.
Method #1 would use several return statements.
When these are put into the assembly code, method #1 has many jumps which could be avoided by using method #2.
I don't remember where this was discussed or who said it, though.
__________________