04.01.2019, 19:50
Quote:
when you say PVars are slow you\'re talking tens of thousands of a millisecond like 0.00023 ms according to some speed tests, meaning you\'d have to use over ten thousand in the one function to notice any slow down
|
Quote:
with format and pvar you still need to enter the thousands for it to start taking over 1ms
|
Also the code i use to benchmark it:
PHP Code:
new tick = GetTickCount();
new string[20];
for (new i = 0; i != 10000; ++i) {
format(string, sizeof(string), "stats_%d_player", i);
SetPVarInt(playerid, string, i);
}
printf("End: %dms", (GetTickCount() - tick));