FunctionCompile

FunctionCompile[func]

generates a compiled code function from a Wolfram Language function.

Details and Options

Examples

open all close all

Basic Examples  (1)

Compile a Function into a compiled code function:

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

The CompiledCodeFunction evaluates with an argument of the correct type:

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

If unexpected arguments are given, an error results:

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

Many common operations are supported in compiled code:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
Out[7]=

Information can extract the signature of the CompiledCodeFunction:

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

Scope  (9)

Possible Issues  (3)

Neat Examples  (1)

Introduced in 2019
(12.0)