This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12850] memory consumption for heavy template instantiations tripled since 3.3
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2004 05:53:37 -0000
- Subject: [Bug c++/12850] memory consumption for heavy template instantiations tripled since 3.3
- References: <20031030234001.12850.jens.maurer@gmx.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-21 05:53 -------
Here are the results for -O0, now that PR 18683 is now fixed:
cp/lex.c:716 (copy_decl) 1087604: 0.3% 0: 0.0% 5906492:10.6% 0: 0.0%
56404
cp/pt.c:3978 (coerce_template_parms) 41586524: 9.6% 0: 0.0% 136540: 0.2%
3865680: 7.4% 1138236
Though we do create a lot:
cp/parser.c:278 (cp_lexer_new_main) 0: 0.0% 22585856:36.1% 0: 0.0%
6332928:12.1% 5
Which is mostly a ggc_realloc of a buffer of all the tokens, maybe there is a better way of allocating this
buffer as it seems like we create a lot of overhead because ot it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12850