Raised This Month: $ Target: $400
 0% 

Code Style


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-16-2010 , 15:42   Re: Code Style
Reply With Quote #5

Quote:
Originally Posted by Sylwester View Post
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.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode