Florian Fischer
authored
According to godbolt.org do { if constexpr(false) { break; } int foo = 42; foo++; } while(false); does result in code generation for gcc 10.2 and clang 11.0.1 as opposed to do { if constexpr(false) { int foo = 42; foo++; }} while(false); which does not result in code generation for both gcc and clang. And this simple change did indeed significantly increases our echo benchmark performance. We were probably creating a lot of std::stringstream objects without ever using them.