From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22218 invoked by alias); 16 Oct 2002 01:03:02 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 22211 invoked from network); 16 Oct 2002 01:03:01 -0000 Received: from unknown (HELO mail-out2.apple.com) (17.254.0.51) by sources.redhat.com with SMTP; 16 Oct 2002 01:03:01 -0000 Received: from mailgate2.apple.com (A17-129-100-225.apple.com [17.129.100.225]) by mail-out2.apple.com (8.11.3/8.11.3) with ESMTP id g9G131s14837 for ; Tue, 15 Oct 2002 18:03:01 -0700 (PDT) Received: from scv2.apple.com (scv2.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Tue, 15 Oct 2002 18:02:50 -0700 Received: from apple.com (johada5.apple.com [17.201.20.185]) by scv2.apple.com (8.11.3/8.11.3) with ESMTP id g9G12mc25243; Tue, 15 Oct 2002 18:02:48 -0700 (PDT) Date: Tue, 15 Oct 2002 19:18:00 -0000 Subject: Re: Request of new __attribute__ for switch statements (elimination of the bounds check) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v546) Cc: Dale Johannesen , Michael Matz , Jamie Lokier , Kevin Lawton , gcc@gcc.gnu.org To: Zack Weinberg From: Dale Johannesen In-Reply-To: <20021016004929.GO15067@codesourcery.com> Message-Id: Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00908.txt.bz2 On Tuesday, October 15, 2002, at 05:49 PM, Zack Weinberg wrote: > It's just that I see removing the bounds checks on a switch statement > as a marginal optimization compared to the risk. I've never seen a > switch be the bottleneck in anything. I have. However, it was a switch on (x&7) with 8 cases, not an enum. I do not think new syntax is the right way to fix this case, which demonstrates an optimizer deficiency.