Compile Time Function Execution

Compile time function execution (or compile-time function evaluation, CTFE) is the ability of a compiler, that would normally compile a function to machine code and execute it at run-time, to execute the function at compile-time. This is possible if the arguments to the function are known at compile time, and the function does not make any reference to or attempt to modify any global state (is a pure function).

Even if the value of only some of the arguments are known, the compiler may still be able to perform some level of compile time function execution (partial evaluation), possibly producing more optimized code than if no arguments were known.

Read more about Compile Time Function Execution:  Example

Famous quotes containing the words compile, time, function and/or execution:

    If I were a maker of books I should compile a register, with comments, of different deaths. He who should teach people to die, would teach them to live.
    Michel de Montaigne (1533–1592)

    It’s a great advantage not to drink among hard-drinking people. You can hold your tongue and, moreover, you can time any little irregularity of your own so that everybody else is so blind that they don’t see or care.
    F. Scott Fitzgerald (1896–1940)

    The function of comedy is to dispel ... unconsciousness by turning the searchlight of the keenest moral and intellectual analysis right on to it.
    George Bernard Shaw (1856–1950)

    The application requisite to the duties of the office I hold [governor of Virginia] is so excessive, and the execution of them after all so imperfect, that I have determined to retire from it at the close of the present campaign.
    Thomas Jefferson (1743–1826)