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)

    As nature requires whirlwinds and cyclones to release its excessive force in a violent revolt against its own existence, so the spirit requires a demonic human being from time to time whose excessive strength rebels against the community of thought and the monotony of morality ... only by looking at those beyond its limits does humanity come to know its own utmost limits.
    Stefan Zweig (18811942)

    My function in life is not to be a politician in Parliament: it is to get something done.
    Bernadette Devlin (b. 1947)

    It is clear that in a monarchy, where he who commands the exceution of the laws generally thinks himself above them, there is less need of virtue than in a popular government, where the person entrusted with the execution of the laws is sensible of his being subject to their direction.
    —Charles Louis de Secondat Montesquieu (1689–1755)