Answer
By evaluating expressions during compilation, constexpr moves computation out of the runtime path—constants, lookup tables, and derived values are baked into the binary, eliminating startup or per-call cost. It also enables the compiler to optimize based on known values. The runtime simply uses the precomputed results.
constexpr int limit = compute(); // no runtime work to get 'limit'Real-world example Computing configuration constants at compile time removes their setup cost from application startup.