[Bug c++/80290] [6/7 Regression] g++ uses unreasonable amount of memory compiling nested string maps
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 4 12:50:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80290
--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #13)
> typedef std::pair<unsigned, std::pair<const char *, std::pair<const char *,
> std::pair<const char *, const char *> > > > FruMap;
> extern const FruMap frus[] = {
> { 1, { "", { "", {"",""}, }, }, },
> };
>
> is twice as fast as
>
> typedef std::pair<unsigned, std::pair<const char *, std::pair<const char *,
> std::pair<const char *, std::pair<const char *, const char *> > > > > FruMap;
>
> extern const FruMap frus[] = {
> { 1, { "", { "", { "", {"",""}, }, } }, },
> };
>
> the latter with 70713 implicit_conversion calls while the former with "only"
> 14331 implicit_conversion calls. Removing another std::pair<> level reduces
> it to 4389 calls (still 10689 tsubst_copy_and_build calls(!)).
Similar amount of cxx_eval_call_expression so it boils down to constexpr
handling...
More information about the Gcc-bugs
mailing list