Thread
: [Solved]
Little optimization
View Single Post
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
01-22-2020 , 11:41 Re: Little optimization
#
4
Quote:
Originally Posted by
HamletEagle
Why in the world you want an one line solution?
How in the world would that be an optimization? Less lines has nothing to do with how fast the code is. You should try to write clear and readable code, not short code. Short code is not a goal, if the plugin ends up short that's cool, if it doesn't then it's perfectly fine.
Funny enough both the if check and the ternary operator would likely be translated to the same assembly instructions by the compiler.
Don't waste your time trying to fix something that's not broken.
Okay thanks
__________________
My Plugins:
COD: HitMarkers
Advanced Glow Menu: Fully Customizable
Napoleon_be
View Public Profile
Send a private message to Napoleon_be
Visit Napoleon_be's homepage!
Find More Posts by Napoleon_be