This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80290] [6/7 Regression] g++ uses unreasonable amount of memory compiling nested string maps
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 04 Apr 2017 12:50:41 +0000
- Subject: [Bug c++/80290] [6/7 Regression] g++ uses unreasonable amount of memory compiling nested string maps
- Auto-submitted: auto-generated
- References: <bug-80290-4@http.gcc.gnu.org/bugzilla/>
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...