From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9823 invoked by alias); 12 Oct 2003 23:58:12 -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 9812 invoked from network); 12 Oct 2003 23:58:10 -0000 Received: from unknown (HELO mail.esperi.org.uk) (194.247.41.52) by sources.redhat.com with SMTP; 12 Oct 2003 23:58:10 -0000 Received: from esperi.org.uk (1000@amaterasu.srvr.nix [192.168.14.14]) by mail.esperi.org.uk (8.12.10/8.12.10) with ESMTP id h9CNw60j012355; Mon, 13 Oct 2003 00:58:06 +0100 Received: (from nix@localhost) by esperi.org.uk (8.12.10/8.12.10/Submit) id h9CNw4kr015495; Mon, 13 Oct 2003 00:58:04 +0100 To: "Zack Weinberg" Cc: gcc mailing list Subject: Re: switch question in recog.c References: <87d6d84r5m.fsf@codesourcery.com> From: Nix X-Emacs: anything free is worth what you paid for it. Date: Mon, 13 Oct 2003 02:15:00 -0000 In-Reply-To: <87d6d84r5m.fsf@codesourcery.com> (Zack Weinberg's message of "Tue, 7 Oct 2003 22:34:56 +0000 (UTC)") Message-ID: <87k77a6mb7.fsf@amaterasu.srvr.nix> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-10/txt/msg00436.txt.bz2 On Tue, 7 Oct 2003, Zack Weinberg moaned: > "For maximum obfuscation, the outer braces can be removed": The most extreme example of this I've ever seen came from the UNIX-HATERS archives, attributed to Harbison and Steele's "C: A Reference Manual".. I'm sure that everyone looking at this will agree that it is a nice clear and sensible micro-optimization: switch (x) default: if (prime(x)) case 2: case 3: case 5: case 7: process_prime(x); else case 4: case 6: case 8: case 9: case 10: process_composite(x); -- `If you want a vision of the future, it is a wireless broadband network feeding requests for foreign money-laundering assistance into a human temporal lobe, forever. With banner ads.' --- John M. Ford