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)
“My time has been passed viciously and agreeably; at thirty-one so few years months days hours or minutes remain that Carpe Diem is not enough. I have been obliged to crop even the secondsfor who can trust to tomorrow?”
—George Gordon Noel Byron (17881824)
“The information links are like nerves that pervade and help to animate the human organism. The sensors and monitors are analogous to the human senses that put us in touch with the world. Data bases correspond to memory; the information processors perform the function of human reasoning and comprehension. Once the postmodern infrastructure is reasonably integrated, it will greatly exceed human intelligence in reach, acuity, capacity, and precision.”
—Albert Borgman, U.S. educator, author. Crossing the Postmodern Divide, ch. 4, University of Chicago Press (1992)
“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)