View Single Post
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 02-01-2014 , 14:19   Re: In general, when should I use stock vs public vs [blank]
Reply With Quote #9

Quote:
Originally Posted by friagram View Post
use public for every function
new for every variable
IsValidClient in every loop

who needs parsimony in programming when you have 8+ core xeons at ~3ghz
There is more than that to it, IsValidClient can die long ago, such a lazy horrible piece of code, making every possible CHECKS that most of them is impossible to happen in every piece of code.

Sourcemod is a scripting language, every single variable you create are using 32 bits and every NEW clear the whole memory for you. If you understand the difference between static, new, decl and dynamic array (YEA DYNAMIC ARRAYS YEA YEA YEA), it shouldnt slow you down and it will optimize the process of your plugin which can definitely affect the game performance.

It like valve saying, cs:go going to use 4 gb of ram per server and a total of 8 threads doing back ground work because we have today technology (lazy and/or don't have knowledge). Hope you understand that the price of the servers come with it since the point is to host as many server as you can on a 8+ core xeons.

Quote:
Originally Posted by berni View Post
Error: BIG FAIL detected
LOL

Last edited by Mathias.; 02-01-2014 at 14:29.
Mathias. is offline