View Single Post
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 11-03-2008 , 16:47   Re: [KZ] Jump-Bug Trainer
Reply With Quote #21

Quote:
Originally Posted by MPNumB View Post
I just don't wanna use more variables what will take more rams. So I'm just using unneeded variables (like origin[0] [1]), cuz I really don't need them at all.


Agree!!! Now I'm using things like "g_" "s_" "a" "b" "i" "f"... I dunno why I can't get it... I'm trying to make it as readable as I can, but I'm more interested in rams and cpu insted of creating new temp variable for everything. =P

P.S. You would die if you'd saw private mpbhops code.
Creating temporary variables will usually be much better in every aspect. When writing plugins, you need to have in mind that most servers have much more memory to spare than CPU. Also, if you're not using multi-dimensional 1000 cell arrays, the extra space used will be neglible. Normally, you would think less code means less actual instructions, but this is not true in most cases. Native calls take hundreds of instructions. Re-indexing arrays can generate extra unecessary OPs, even if they appear shorter in source code.
__________________

Community / No support through PM
danielkza is offline