On Fri, 16 Sep 2005, Ross Ridge wrote:

> Joe Buck writes:
> > To me, even a 1% performance hit to fix this would be excessive.
> 
> I think any performance hit to support UCNs or extended characters outside
> of strings and comments is undesirable.  GCC should have an option like
> "-trigraphs" for the few programs that need this feature.

I have indeed just submitted a patch to add such an option, 
-fextended-identifiers.  This is however in recognition of the 
*implementation* being experimental rather than an intention permanently 
to exclude it from the -std options (including -std=gnu99) which should in 
principle enable this feature.

Naturally the idea would be to avoid performance cost *in the normal case 
where extended identifiers are not used* from extended identifiers, with 
all complications from such identifiers being a slow case, just as lexing

a??/U??/
??/
0??/
000000??/
??/
z

(as the three tokens a, \, U0000000z, because the UCN syntax is not met) 
is a slow and rare case (which GCC correctly implements).

I do not however see any problem with a 1% (or 10%) slowdown for programs 
*where a significant proportion of identifiers are extended identifiers* 
in order to refine the handling of such identifiers.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    [EMAIL PROTECTED] (personal mail)
    [EMAIL PROTECTED] (CodeSourcery mail)
    [EMAIL PROTECTED] (Bugzilla assignments and CCs)

Reply via email to