Are macros faster than stocks?
#1

The question in the title, thanks.
Reply
#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
#3

Thanks for the info.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)