15.01.2018, 21:21
Quote:
There is another myth which says "making functions is always slower" which isn't true at all when it comes to dealing with multi-dimensional arrays. If done properly, making functions can actually improve performance significantly.
Code:
for(new y = 0; y < 100; y++) { Array[playerid][y] = y; } Code:
stock DoSomething(arr[]) { for(new y = 0; y < 100; y++) { arr[y] = y; } } |
pawn Code:
for(new y = 0,arr=Array[playerid]; y < 100; y++)
{
arr[y] = y;
}