Raised This Month: $32 Target: $400
 8% 

Which code is faster ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 01-12-2019 , 17:43   Which code is faster ?
Reply With Quote #1

sasdasd

Last edited by Kellan123; 02-25-2020 at 06:09.
Kellan123 is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 01-12-2019 , 21:51   Re: Which code is faster ?
Reply With Quote #2

certainly the switch; but always go the most readable route (which also happens to be the switch in this specific case)
headline is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 01-13-2019 , 11:52   Re: Which code is faster ?
Reply With Quote #3

Best practice is to use the switch but you can’t go wrong either way. Print function is inexpensive unless you use it too frequently.
__________________
Spirit_12 is online now
Reply


Thread Tools
Display Modes

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 18:52.


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