closeHello! Click here if you would like to know what Factolex is about.

Compile time function execution

Start collecting facts
These are the best facts for Compile time function execution, collected by our users from the web:
(You can find the source through the icon at the end of each fact)
  1. 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

    Source: Wikipedia Unhappy with this fact? more info
    created by user picturefactobot on March 2, 2009
  2. 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

    Source: Wikipedia Unhappy with this fact? more info
    created by user picturefactobot on March 2, 2009
  3. 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, namely partial evaluation, possibly producing more optimized code than if no arguments were known

    Source: Wikipedia Unhappy with this fact? more info
    created by user picturefactobot on March 2, 2009
  4. This example code is in the D programming language: int square(int x) return x * x

    Source: Wikipedia Unhappy with this fact? more info
    created by user picturefactobot on March 2, 2009
  5. const int y = square(3); // y is set to 9 at compile time In C++, template metaprogramming is often used to compute values at compile time, such as: template struct Factorial enum value = N * Factorial::value

    Source: Wikipedia Unhappy with this fact? more info
    created by user picturefactobot on March 2, 2009
Do you know more? Submit a new fact

Add a new fact

A fact should only contain one sentence, describing an aspect of the term.

Fact
Example: located on the west coast of the U.S
Source
Tags
optional

Example: geography location -- separate tags with spaces

Add one more fact or give me some inspiration from:

More lexica »Featured Lexica

Look at what our users have created already.

Feedback

Please tell us what you think about our project

Contribute

On Factolex you can add facts and terms that you believe are missing.

To be sure that the term hasn't already been entered, please use the search function before doing so.

Home  |  About  |  FAQ  |  Feedback  |  Tools  |  Stats  |  Contact Us  |  API  |  Blog
Change language to: