Raised This Month: $ Target: $400
 0% 

help with optimization :(


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-11-2011 , 10:55   Re: help with optimization :(
Reply With Quote #11

Optimizing just for memory here doesn't make sense. That's not something which will be called often. When you read the first post, if he doesn't specify the optimizating edge is because he asks about how to organize better his code, which can be lead to a better usage of memory for sure. What I mean is your tip won't help him, you make the code more difficult for a trivial gain. (But for sure, it can be useful for specific case)
__________________
Arkshine is offline
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 02-11-2011 , 15:31   Re: help with optimization :(
Reply With Quote #12

Then how about looking more structural by using enums.
PHP Code:
enum _:COUNTERS
{
  
cntr_nemesis,
  
cntr_multimod,
  
cntr_swarmmod,
  
cntr_survivor,
  
cntr_plaguemod,
  
cntr_synapsismod,
  
cntr_armagedonmod
}

new 
counters[33][COUNTERS];

counters[id][cntr_nemesis]++; 

Last edited by Lulu the hero; 02-11-2011 at 15:35.
Lulu the hero is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode