CompiledFunction

CompiledFunction[args]
represents compiled code for evaluating a compiled function.

DetailsDetails

  • Compile generates a CompiledFunction object that can be executed by applying it to appropriate arguments.
  • CompiledFunction objects that are constructed explicitly can also be executed. Basic consistency checks are done when such objects are first evaluated by the Wolfram Language.
  • The code in a CompiledFunction object is based on an idealized register machine.
  • A CompiledFunction object can additionally refer to natively compiled code.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

CompiledFunction objects are generated by Compile:

In[1]:=
Click for copyable input
Out[1]=

CompiledFunction objects can be used as normal Function objects:

In[2]:=
Click for copyable input
Out[2]=

Arguments are coerced, if possible, to be approximate real:

In[3]:=
Click for copyable input
Out[3]=

When exceptional values are encountered, the uncompiled function is used:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 1991
(2.0)
| Updated in 2010
(8.0)