How to write efficient code?

No one in real world programming on Roblox cares about your “bytecode level optimization”. Tools exist to be used, and those libraries are tools that serve a purpose. ECS is a paradigm that follows specific criteria to be considered ECS. If you consider saving data into a table as ECS, then perhaps everyone who works with anything inside of Roblox - is using ECS lol.

If you want to program in a “pure” and “zero-cost” way, then well, I’m afraid that you are in a wrong environment, as you must want to write in assembly at this point, or even in machine code.

Decades ago people created higher and higher level programming languages for a reason, for it to solve the problem of programming being a rollercoaster of steep entry curves, and those abstractions are meant to serve as a friendly layer of interaction with the machine.

You are jumping into a dynamic high level language, and yell in everyone’s ears around that they should ditch all the language’s sugar and features to write “pure” code, that is completely pointless in real world scenarios.

If you like squeezing every single nanosecond of execution time and cut “overhead”, then good for you, but you shouldn’t mislead people into thinking that it’s the “right way” of programming.

7 Likes