24.11.2013, 11:59
test1.pwn
test1.amx -> size: 10,5 KB
---
test2.pwn
test2.amx -> size: 3,23 KB
---
You're now able to see huge difference!
pawn Код:
#define FILTERSCRIPT
#include < a_samp >
new
a[ 2000 ],
b[ 2000 ],
c[ 2000 ],
d[ 2000 ],
e[ 2000 ]
;
public OnFilterScriptInit( )
{
for( new i; i != 2000; i++ )
{
a[ i ] = 200;
b[ i ] = 200;
c[ i ] = 200;
d[ i ] = 200;
e[ i ] = 200;
}
return 1;
}
pawn Код:
Header size: 116 bytes
Code size: 468 bytes
Data size: 40000 bytes // <--
Stack/heap size: 16384 bytes; estimated max. usage=9 cells (36 bytes)
Total requirements: 56968 bytes // <--
---
test2.pwn
pawn Код:
#define FILTERSCRIPT
#include < a_samp >
new
a[ 2000 char ],
b[ 2000 char ],
c[ 2000 char ],
d[ 2000 char ],
e[ 2000 char ]
;
public OnFilterScriptInit( )
{
for( new i; i != 2000; i++ )
{
a{ i } = 200;
b{ i } = 200;
c{ i } = 200;
d{ i } = 200;
e{ i } = 200;
}
return 1;
}
pawn Код:
Header size: 116 bytes
Code size: 488 bytes
Data size: 10000 bytes // <--
Stack/heap size: 16384 bytes; estimated max. usage=9 cells (36 bytes)
Total requirements: 26988 bytes // <--
---
You're now able to see huge difference!