Are macros faster than stocks?
#2

If you create a macro, during complication, the code in the macro (if called) replaces the macro name/title. Basically:

pawn Код:
#define       take_control(%0, %1)         printf("lol, %s %s", %0, %1) // Probably a bad example        

public OnGameModeInit() {
take_control("foo", "bar");
}
would result in the code in OnGameModeInit becoming:

pawn Код:
printf("lol, %s %s", "foo", "bar");
Seeing as the PAWN speed order is as followed:

Quote:
Originally Posted by ******
Nothing
Constants
Variables
Arrays
Native functions
Custom functions
Remote functions
stocks (being custom functions) would be slower. Though Macros are intended for use of small snippets of code, not huge functions.
Reply


Messages In This Thread
Are macros faster than stocks? - by Whizion - 23.10.2010, 06:50
Re: Are macros faster than stocks? - by Calgon - 23.10.2010, 08:40
Re: Are macros faster than stocks? - by Whizion - 23.10.2010, 10:23

Forum Jump:


Users browsing this thread: 1 Guest(s)