15.02.2011, 00:56
I did a test and I found that Normal Variables are faster than PVars.
pawn Код:
#include <a_samp>
#define ITTERATIONS 10000000
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit()
{
new tick1,tick2;
new playerid, Variable[MAX_PLAYERS];
tick1 = tickcount();
for(new i;i<ITTERATIONS;i++){
if(Variable[playerid] == 0) continue;
}
printf("Normal Variable: %d", tickcount()-tick1);
tick2 = tickcount();
for(new i;i<ITTERATIONS;i++){
if(GetPVarInt(playerid, "testing") == 0) continue;
}
printf("Per-Player Variable: %d", tickcount()-tick2);
return 1;
}