01-17-2016, 09:29 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Code structure > "processing power"
In most cases at least.
In most cases at least.
Fearless looking for geeks
|
01-17-2016, 09:29 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Code structure > "processing power"
In most cases at least.
01-17-2016, 09:30 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
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" 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.
01-18-2016, 05:09 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(01-17-2016, 09:30 PM)Wobbuffet Wrote:(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 does it really matter to you how something on a forum is written out? do you have to cry at every response?
01-18-2016, 05:16 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
01-18-2016, 05:20 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
(01-18-2016, 05:16 PM)Wobbuffet Wrote:(01-18-2016, 05:09 PM)Astari Wrote: does it really matter to you how something on a forum is written out? do you have to cry at every response?You were the one that started correcting people, not me :b yes, for a joke, you take things way to far to the point where i have to cringe because of how you're acting.
01-18-2016, 05:22 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Astari, Wobbuffet, you've deviated from the topic a tad bit too much, take it to PMs or TS.
01-18-2016, 07:12 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(01-17-2016, 04:28 PM)Astari Wrote: lua error on line 1 c: Error: Invalid command (01-17-2016, 05:40 PM)Doctor Internet Wrote: Firstly, there is a function built into the GM for creation of commands. There's also a framework in ULX to make commands but he was just making a joke (01-17-2016, 07:31 PM)Zyphix Wrote: Yeah but that way he did it is if you want to just make a concommand... Sorta. (It hooks PlayerSay still) Again, ULX has a system for adding its own console commands. Also, that's not really a big waste of processing power. The mistake is not making text a local variable and like you said the incorrect casing. That said, it's a post on a forum and not something being added to anything.... Anyway, glad to see the contributor program is still a thing
01-18-2016, 07:45 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
(01-18-2016, 07:12 PM)Goigle Wrote:(01-17-2016, 04:28 PM)Astari Wrote: lua error on line 1 c: Technically it is a waste, but we are down to byte level so you will never feel it, unless it is repeated many, many times (retaining the codestyle). I think he even forgot an "end" to close the if, because "end)" closes the function. But then again, it is just a post on the forums.
01-18-2016, 07:50 PM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Checked Encoding
)
Did I start an argument? How fun.
Yours Doctor Internet; Developer, Systems Operator, Data Protection Officer, Business Advisor, Server Administrator, Community Moderator |
« Next Oldest | Next Newest »
|