This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, c++/14179 is a PR about having an array of 8 millions of elements with initializers for all of them. We used to handle this pretty fast with GCC 2.95 (as we were expanding on the fly), but right now this is both a compile-time and memory hog. This patch addresses some compile-time issues, by tweaking cp_parser_initializer_clause, so that it's super fast for simple literals used in initializers. This allows my rather slow computer to compile an array with half million of elements in 0m32 instead of 0m50, which is a 40% improvement. In projection, I'm theoretically able to compile the full testcase in "only" 8 minutes (this is a checking compiler, though); GCC 2.95 can do it in 1m30. Tested on i686-pc-linux-gnu, no new regressions. OK for mainline? OK for 3.4? Giovanni Bajo cp/ PR c++/14179 * parser.c (cp_parser_initializer): Speed up parsing of simple literals as initializers.
Attachment:
patch-pr14179-1.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |