Optimizer
The Luna Compiler/Assembler has many different stages of translation / optimization when compiling your source code. The machine code will be optimized for speed and size while compiled.
The optimization stages include a analysis of memory block access, jumps and mathematical or logicaloperations. Jumps and calls will be done by faster and shorter direct adrressing instead of realtive addresses . Comparisons will be restructured to increase speed. Calculations are soolved and reduced as fas as possible.
A other optimization stage is the pattern recognition. It will analyze data in registers. It recongnizes patterns and will analyze the logic order. This will avoid loading a pointer again that is alredy loaded. It will also recognize if a register value has been modified by the program sequence.
The optimization levels are turned on by default. You can using compiler command-line option to disable the optimization completely or using pragma to deactivate it for parts.