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 (15331592)
“Like to the time o th year between the extremes
Of hot and cold, he was nor sad nor merry.”
—William Shakespeare (15641616)
“To look backward for a while is to refresh the eye, to restore it, and to render it the more fit for its prime function of looking forward.”
—Margaret Fairless Barber (18691901)
“Some hours seem not to be occasion for any deed, but for resolves to draw breath in. We do not directly go about the execution of the purpose that thrills us, but shut our doors behind us and ramble with prepared mind, as if the half were already done. Our resolution is taking root or hold on the earth then, as seeds first send a shoot downward which is fed by their own albumen, ere they send one upward to the light.”
—Henry David Thoreau (18171862)