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

Efficient Scripting.Speed > Non-Efficient Scripting.Speed?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 11-06-2016 , 03:14   Efficient Scripting.Speed > Non-Efficient Scripting.Speed?
Reply With Quote #1

So is there any efficient scripting style which will increase speed or plugin ?

(semicolon will increase speed ?)
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 11-06-2016 , 05:14   Re: Efficient Scripting.Speed > Non-Efficient Scripting.Speed?
Reply With Quote #2

Quote:
Originally Posted by Ghosted View Post
So is there any efficient scripting style which will increase speed or plugin ?
Yes.
Quote:
Originally Posted by Ghosted View Post
(semicolon will increase speed ?)
No.
The compiler will take your script and trim all the fancy stuff like this and create binary code which is more efficient than text.

Most times it's not important. Especially if it's a one-line-edit. It's more important which methods you use, not which style of coding. The only time you have to worry about efficiency is:
A loop within another loop (And that's only in extreme cases)
Functions called each server frame. Like PreThink for example.
__________________

Last edited by Black Rose; 11-06-2016 at 05:20.
Black Rose is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-06-2016 , 12:44   Re: Efficient Scripting.Speed > Non-Efficient Scripting.Speed?
Reply With Quote #3

Style will NOT affect execution speed at all whatsoever. Style, in the general sense, is just style, it has nothing to do with execution. Style is how you document, indent, etc. It mostly affects readability. Style is completely ignored by the compiler.

It depends on what code you write.
__________________
fysiks is offline
Infest
Member
Join Date: Mar 2005
Old 11-08-2016 , 06:25   Re: Efficient Scripting.Speed > Non-Efficient Scripting.Speed?
Reply With Quote #4

Quote:
Originally Posted by Ghosted View Post
So is there any efficient scripting style which will increase speed or plugin ?
Give this a read: https://wiki.alliedmods.net/Optimizi...d_X_Scripting)

Last edited by Infest; 11-08-2016 at 06:32.
Infest is offline
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 02:11.


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