Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version nyu B notes v1.5 12/10/84; site acf4.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!cmcl2!acf4!hkr4627
From: hkr4627@acf4.UUCP (Hedley K. J. Rainnie)
Newsgroups: net.lang.c
Subject: the C switch
Message-ID: <800006@acf4.UUCP>
Date: Sat, 2-Mar-85 12:36:00 EST
Article-I.D.: acf4.800006
Posted: Sat Mar  2 12:36:00 1985
Date-Received: Mon, 4-Mar-85 07:08:23 EST
Organization: New York University
Lines: 12

Do any C compilers perform switch optimization? I.e. tradeoff cascaded if
for table lookup. Clearly this is an optimization since a table would be
very wasteful for:

    switch(x){
     case 0: a();break;
     case 65535: b();
    }

Just wondering. 

Hedley.