CompilationOptions

CompilationOptions
is an option for Compile that specifies settings for the compilation process.

DetailsDetails

  • CompilationOptions applies to the creation of the compiled function.
  • CompilationOptions accepts lists of settings in the form CompilationOptions->{}.
  • CompilationOptions can also take the following nested settings:
  • "ExpressionOptimization"Automaticwhether to optimize the input expression
    "InlineCompiledFunctions"Automaticwhether to expand the body of nested compiled functions
    "InlineExternalDefinitions"Automaticwhether to use external definitions
  • Possible values for are:
  • Falsedo not optimize the input expression
    Trueoptimize the input expression
    Automaticonly use the optimized expression if the compiled function does not make external calls
  • Possible values for are:
  • Falsedo not inline nested compiled functions
    Trueinline nested compiled functions
    Automaticinline small nested compiled functions
  • Possible values for are:
  • Falsedo not use external definitions
    Trueinsert the body of external definitions
    Automaticuse the type of external definitions

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Options to control how the compilation runs can be given in a nested form. For example, you can turn off compilation optimizations. This may cause the same computation to be done more than once:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2010
(8.0)