View Single Post
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 05-23-2018 , 02:18   Re: Suggestion - arraycheck
Reply With Quote #11

Quote:
Originally Posted by Relaxing View Post
That's not overpowered.
Code:
static cell AMX_NATIVE_CALL arrayset(AMX *amx, cell *params) {     cell value = params[2];     if (!value)     {         memset(get_amxaddr(amx, params[1]), 0, params[3] * sizeof(cell));     } else {         int size = params[3];         cell *addr = get_amxaddr(amx, params[1]);         for (int i=0; i<size; i++)         {             addr[i] = value;         }     }     return 1; }
And how do you think a native is called from a plugin scripted in pawn? They are not called in a simple function jump. Indagate the main codeflow when a pawn plugin calls a native, I'm talking about machine instructions. It's known if you want to improve performance in a plugin you should avoid module calls. Years ago this was a problem, now AMXX improved a lot since that, but it stills something that cannot be ignored.

I'm just replicating Arkshine's words. Just give a look on other forum's threads where optimization issues were discussed.

If you want to have your scripts over a module, then write your entire addon on it.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline