Optimizing [enums or simple variables]
#1

Just a simple question, to experienced members
What is faster and more optimized

PHP код:
new pKills[MAX_PLAYERS];
new 
pDeaths[MAX_PLAYERS];
new 
pSpree[MAX_PLAYERS];
new 
pAdmin[MAX_PLAYERS];
new 
pVip[MAX_PLAYERS]; 
Or

PHP код:
enum pInfo {
pKillspDeathspSpreepAdminpVip
};
new 
Info[MAX_PLAYERS][pInfo
Reply
#2

From my knowledge it`s same. Just in enum thing you are packing it all in one package.
Reply
#3

Two dimensional arrays are probably slightly slower but I wouldn't be at all concerned about that. SA-MP forum members have become obsessed lately with extremely tiny and negligible optimizations. Find the real culprits with the profiler plugin and concentrate on those, instead.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)