On 06/20/2018 05:25 AM, Steven Bosscher wrote: > On Tue, Jun 12, 2018 at 10:44 PM, Jeff Law wrote: >> On 06/05/2018 01:15 AM, marxin wrote: >>> >>> + The definition of "much bigger" depends on whether we are >>> + optimizing for size or for speed. If the former, the maximum >>> + ratio range/count = 3, because this was found to be the optimal >>> + ratio for size on i686-pc-linux-gnu, see PR11823. The ratio >>> + 10 is much older, and was probably selected after an extensive >>> + benchmarking investigation on numerous platforms. Or maybe it >>> + just made sense to someone at some point in the history of GCC, >>> + who knows... */ >> "much older" is an understatement. I believe the magic "10" pre-dates >> my involvement in GCC. You can find evidence of it as far back as >> gcc-0.9. I doubt it was extensively benchmarked, and even if it was, >> the targets on which it was benchmarked don't reflect modern target >> reality in terms of importance. > > When I added this comment > (https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/stmt.c?r1=189284&r2=189285&) > it as an attempt at humor. I should have turned the number into a > PARAM at the time. Maybe that's something Martin could still do now? A PARAM feels like overkill, but I certainly wouldn't object. I'd be happy with that, a const member in the class or even the adjusted constant.
jeff