|
|
|
|
|
by Chabs
2829 days ago
|
|
Expression templates (ala boost::spirit) definitely come to mind. The callstack in a -O0 build can get very, very deep. Heck just using std::numeric_limits<int>::min() will incur a function call in -O0, but nobody cares since it gets optimized in -O1 and up. The same thing applies more and more as you invoke templates from templates, but, again, nobody cares since we are confident it'll get optimized/inlined easily. It's not nearly as prevalent in modern code since constexpr static variables are now a thing, but relying on these optimizations has historically been super important. |
|