30.04.2016, 18:40
Quote:
Lets say you want to save player name for each player to a variable. So you create variable:
pawn Код:
In a memory usage perspective, lets count difference between 24 and 128. Pawn uses cells for every variable (Float,Int,Char, anything). And if im not mistaking cell in pawn is 32bit or 4 Bytes. So MAX_PLAYERS (1000) * 128 Cells = 128 000 Cells * 4 Bytes = 512000Bytes or ~500KB But if you use 24 cells for username. Than 1000*24 = 24000*4=96000B = ~90KB Now 500KB and 90KB...So 128 and 24 cells for each player, that is a big difference, much bigger than it seems on first sight. |