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)

    What persuades men and women to mistake each other from time to time for gods or vermin is ideology. One can understand well enough how human beings may struggle and murder for good material reasons—reasons connected, for instance, with their physical survival. It is much harder to grasp how they may come to do so in the name of something as apparently abstract as ideas. Yet ideas are what men and women live by, and will occasionally die for.
    Terry Eagleton (b. 1943)

    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)

    I will soon be going out to shape all the singing tomorrows.
    Gabriel Péri, French Communist leader. Letter, July 1942, written shortly before his execution by the Germans. Quoted in New York Times (April 11, 1943)