CompiledFunction

CompiledFunction[args]

represents compiled code for evaluating a compiled function.

Details

  • 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.

Examples

Basic Examples  (1)

CompiledFunction objects are generated by Compile:

CompiledFunction objects can be used as normal Function objects:

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

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

Introduced in 1991
 (2.0)
 |
Updated in 1999
 (4.0)
2000
 (4.1)
2002
 (4.2)
2010
 (8.0)