29.04.2010, 20:49
The results of the test:
The test was: Like a class, does the function calling the other function care what happens inside the called function, regardless of what value is passed backwards?
I found out that this is the case. Therefore, calling functions using calllocalfunction is more efficient and holds back unwanted function shutdowns.
This also means that public functions get called like they are classes. Therefore, the concept of classes exists inside of Pawn. Sadly, the actual code for real classes is not there.
Regardless, I recommend people work in filterscripts regardless the possibility of calling local functions.
The reason behind it is pure reasoning.
Calling functions inside a filterscript makes it more efficient:
This is why:
a script has it's own memory section assigned. therefore, it cannot go out of it's own space. but this also means that finding a variable or function takes less time thus computer power since it only searches its own territory.
Despite the fact that CallRemoteFunction is needed to call these functions, and that ALL public functions with that function name are called, it still is faster.
My recommendation is that small codes should be called as localfunction and placed in the gamemode itself.
While large codes should be called remotely inside a filterscript.
You could call it specializing?
Anyone has anything to say?
The test was: Like a class, does the function calling the other function care what happens inside the called function, regardless of what value is passed backwards?
I found out that this is the case. Therefore, calling functions using calllocalfunction is more efficient and holds back unwanted function shutdowns.
This also means that public functions get called like they are classes. Therefore, the concept of classes exists inside of Pawn. Sadly, the actual code for real classes is not there.
Regardless, I recommend people work in filterscripts regardless the possibility of calling local functions.
The reason behind it is pure reasoning.
Calling functions inside a filterscript makes it more efficient:
This is why:
a script has it's own memory section assigned. therefore, it cannot go out of it's own space. but this also means that finding a variable or function takes less time thus computer power since it only searches its own territory.
Despite the fact that CallRemoteFunction is needed to call these functions, and that ALL public functions with that function name are called, it still is faster.
My recommendation is that small codes should be called as localfunction and placed in the gamemode itself.
While large codes should be called remotely inside a filterscript.
You could call it specializing?
Anyone has anything to say?