SmartPascal
$O
Compiler Directive
Determines whether Delphi optimises code when compiling
1   {$O-}
2   {$O+}
Description
The $O compiler directive determines whether Delphi compiles the current application with code optimization.
 
Code optimization makes for slightly more efficient code operation, and size.
 
Delphi does this in a way that preserves the logical integrity of the code, but which can confuse during debugging. This is especially true when Delphi creates no code for what it sees as redundant lines, such as variable assignment where the variable is then not used.
Notes
$Optimization is equivalent to $O.

The default value is $O+
Related commands
$Optimization Determines whether Delphi optimises code when compiling
 
Example code :