Eagerly evaluate built-in operators for OptimizationLevel::Simple.
This commit is contained in:
@@ -8,9 +8,10 @@ There are three levels of optimization: `None`, `Simple` and `Full`.
|
||||
* `None` is obvious - no optimization on the AST is performed.
|
||||
|
||||
* `Simple` (default) performs only relatively _safe_ optimizations without causing side-effects
|
||||
(i.e. it only relies on static analysis and will not actually perform any function calls).
|
||||
(i.e. it only relies on static analysis and [built-in operators] for constant [standard types],
|
||||
and will not perform any external function calls).
|
||||
|
||||
* `Full` is _much_ more aggressive, _including_ running functions on constant arguments to determine their result.
|
||||
* `Full` is _much_ more aggressive, _including_ calling external functions on constant arguments to determine their result.
|
||||
One benefit to this is that many more optimization opportunities arise, especially with regards to comparison operators.
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user