The recent patch * c-parser.c (c_lex_one_token): Do not store the canonical spelling for keywords.
causes a significant performance regression on SPEC CPU2000 197.parser. With the above patch, the libc function __ctype_b_loc is called significantly more times, spending twice the number of cycles in that function. Profiling shows 94K hits for fast version and 190K hits for slow version. We suspect that this may involve the toupper() calls in strncasecmp.c. Apparently the canonical name is necessary for some GCC optimization, possibly the automatic substitution of builtins. -- Summary: [4.4 Regression] Canonical spelling optimization dependency Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: regression AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dje at gcc dot gnu dot org GCC build triplet: powerpc*-*-* GCC host triplet: powerpc*-*-* GCC target triplet: powerpc*-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37171