Optimization
This page documents the optimization command.
LD can optimize Lua files by using the /optimize
command in the DMs of the bot.
Once you have used the command, select the options you would like. Then, upload a file to the bot and press the Optimize
button and wait for the bot to respond.
Optimization Options
Fold Constants
This option will fold constant expressions (0 + 1
will be turned into 1
).
Inline Constants
Constant variables will be inlined.
With Inline Constants
enabled, this code will be optimized to the following:
Inline Globals
Known globals and standard library functions will be inlined.
With Inline Globals
enabled, this code will be optimized to the following:
Last updated