All of Rhai’s built-in functions (and operators which are implemented as functions) are pure
(i.e. they do not mutate state nor cause any side-effects, with the exception of
which are handled specially) so using
OptimizationLevel::Full is usually quite safe unless
custom types and functions are registered.
If custom functions are registered, they may be called (or maybe not, if the calls happen to lie within a pruned code block).
Always register custom types and functions after compiling scripts if
DO NOT depend on knowledge that the functions have no side-effects, because those functions can change later on and, when that happens, existing scripts may break in subtle ways.