Arrays...? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Arrays...? (
/showthread.php?tid=304327)
Arrays...? -
KingstoN* - 18.12.2011
What is the best way to use arrays?
PVar, Normal Var, Bit Array?
What is the fastest & safe...
I'd like to know what would bring me greater efficiency in general.
Thank you.
Re: Arrays...? -
admantis - 18.12.2011
second option. I've personally experienced problems with PVars if used largely .. and PVars are slower.
Re: Arrays...? -
Calgon - 18.12.2011
It depends what you mean by 'bit array'. Packed strings/arrays tend to generally be more efficient for memory, yet normal strings/arrays/variables tend to be stable, fast and widely used.
PVars are functions which are considerably slower, as they have the overhead of processing as a function. The thing with other types of variables is that they are declared and processed as variables, PVars deal with the overhead of the native function which generally slows down the reaction speed of getting or setting them.
Re: Arrays...? -
KingstoN* - 18.12.2011
Thank you guys, it helped me.