How can I turn this to #define
#6

Quote:
Originally Posted by Vince
View Post
This is stupid and unnecessary. You'll only increase the size of the compiled amx and therefore you'll also consume more memory, not less. A define or macro merely does some basic text replacing, which means the code is effectively copied to all places that it used, rather than being referenced from a single location.

Furthermore, there's no such thing as "a stock". It's either "a function" or "a stock function" but never just "a stock". A stock function should - as its name implies - contain stock code that can be used in any and all scripts without changes. This function relies on global variables and should therefore not be declared stock.
Isn't direct logical calculation/analysis like WAY WAY faster than calling a function in pawn?
welp if it isn't I kinda learned a new thing today!
Although FYI I'm more concerned about CPU than Ram tho, I would sacrifice a couple bytes, hell even megabytes to speed any day.
Reply


Messages In This Thread
How can I turn this to #define - by NeXoR - 15.06.2016, 22:02
Re: How can I turn this to #define - by NaS - 15.06.2016, 22:07
Re: How can I turn this to #define - by NeXoR - 15.06.2016, 22:11
Re: How can I turn this to #define - by Vince - 15.06.2016, 22:18
Re: How can I turn this to #define - by NaS - 15.06.2016, 22:34
Re: How can I turn this to #define - by PrO.GameR - 15.06.2016, 23:39
Re: How can I turn this to #define - by NeXoR - 16.06.2016, 02:08
Re: How can I turn this to #define - by NaS - 16.06.2016, 10:32
Re: How can I turn this to #define - by Stinged - 16.06.2016, 10:40
Re: How can I turn this to #define - by PrO.GameR - 16.06.2016, 17:01

Forum Jump:


Users browsing this thread: 1 Guest(s)