Raised This Month: $7 Target: $400
 1% 

Suggestion - arraycheck


Post New Thread Reply   
 
Thread Tools Display Modes
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
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 05-23-2018 , 05:16   Re: Suggestion - arraycheck
Reply With Quote #12

Quote:
Originally Posted by meTaLiCroSS View Post
if you want to improve performance in a plugin you should avoid module calls
I'll remember that.
__________________
Relaxing 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 03:32.


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