Thread: ProChat
View Single Post
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-31-2009 , 05:15   Re: ProChat
Reply With Quote #17

Quote:
just an opinion
I think we have to create efficient code when we can. The purpose is to do quality plugin. Safe code sometimes against efficiency depending the need. Maybe the plugin alone it will not be that noticeable, but if you have severals plugins not coded in an efficient way, it will be. What I have said is not my 'method' it's just an efficient method that people should be used as 'standart'.
Why do you use static ? Because you know it's more appropriate to use it on (large) array (or cells) in a function called often. It's the same with switch() or checking one letter instead of using if() elsif() with equal a lot of times. It's more efficient to use it when we can. ( common practice ). Like your check_flags function a lot of code when you may can it in on line.

Anyway it was just suggestions, I don't care if you ignore or not. I was just some help so you plugin can be more efficient. ( I will do my version as it should be and it will compare with profiler. It may be interesting. I will post my version here later, too )

Last edited by Arkshine; 01-31-2009 at 09:10.
Arkshine is offline