[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Re: [PATCH, middle-end] Switch initializations conversion (take four)
From:       Jan Hubicka <hubicka () ucw ! cz>
Date:       2008-02-29 20:15:54
Message-ID: 20080229201554.GF13246 () atrey ! karlin ! mff ! cuni ! cz
[Download RAW message or body]

> I hope that's not discouraging.  Personally, I think this is a good 
> idea, and might be a big win on some codes.  Even if the benchmark is a 
> single real-world application you have at hand -- rather than some 
> well-known benchmark suite -- the patch might be worthwhile if the costs 
> are low enough.  But, we need to have some quantitative information in 
> order to evaluate it.

PR34708 contains a nice real world testcase where such a conversion
would make real difference.  SWIG contains an error reporting function 

static __attribute__ ((__unused__)) const char*
SWIG_Perl_ErrorType(int code) 

that is basically resonably sized switch translating codes to names.
When inlined many times we explode in number of references to string
pools while this conversion would turn the function into simple lookup.

Honza
> 
> -- 
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic