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]

Re: C++ ping: reduce size of cp_token


Tom Tromey wrote:

gcc/cp/ChangeLog:
2008-03-20  Tom Tromey  <tromey@redhat.com>

	* parser.c (struct cp_token) <flags>: Remove.
	<flag_prev_white, flag_digraph, flag_pure_zero>: New fields.
	<location>: Move earlier.
	(eof_token): Update.
	(cp_lexer_get_preprocessor_token): Set flag fields.
	(check_empty_body): Update.
	(cp_parser_template_id): Likewise.
	(cp_parser_pure_specifier): Likewise.
	(cp_parser_nth_token_starts_template_argument_list_p): Likewise.

Do you have any performance data for this patch, either in terms of memory saved or in terms of speed improvements? This patch certainly looks like it should help, because making tokens smaller should save memory, and we know GCC performance is memory-sensitive. However, it's always nice to measure.


I'll pre-approve the patch if you do some plausible measurement of your choice that shows that this makes things no worse.

Thanks,

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]