01-17-2016, 09:41 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(01-17-2016, 09:20 PM)Astari Wrote: processing power wtf are you talking about its one freaking line, it adds like 0.00000001s to the execution time
It's about knowing when to move bytes to your base pointer, and when not to. I mean sure, you can go with a code structure and store a variable, but you'll save bytes if you don't. Saving a variable is not just demanding for the memory, it is also demanding for the garbage collector in Lua, wherein for example C++ it is done manually. On a small scale it you won't feel anything, no, but on a bigger scale you will.
(01-17-2016, 09:29 PM)Avgar Wrote: Code structure > "processing power"
In most cases at least.
To some points, but don't overcomplicate it. Most of the times people can understand what is going on. If you are unsure, you can always add comments; they are not compiled anyways.
But actually, I would have stored a variable IF "text" was called multiple times, because it would be faster to call the variable than to call "string.lower" X times.