[Bug c++/96197] Excess memory consumption, positive correlation with the size of a constexpr array

hyena at hyena dot net.ee gcc-bugzilla@gcc.gnu.org
Wed Jul 15 09:42:08 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96197

--- Comment #4 from Erich Erstu <hyena at hyena dot net.ee> ---
Intuitive logic says that even for a slow algorithm it should not be THAT slow
and memory heavy. And for a constant expression, the slowness of an algorithm
should not be that much of a concern in the first place, because if the
compiler was optimal it would only run that "slow algorithm" once per
compilation. Also, it is not intuitive to assume that a slow algorithm would
cause high memory consumption. In fact, typically you get speed at the cost of
memory.

Bottom line is, it is not a matter of people being lazy, it's a matter of
people making fair assumptions of what the compiler should reasonably be
capable of doing. And in this case, the assumptions were wrong.


More information about the Gcc-bugs mailing list