the C switch

David Sherman dave at lsuc.UUCP
Tue Mar 12 04:11:03 AEST 1985


> Do any C compilers perform switch optimization? I.e. tradeoff cascaded if
> for table lookup.

The code generation algorithms (three of them) are described
in an article by LeRoy Fundingsland, "Code Generation for the
``Switch'' By the Version 7 C Compiler" which appears in UNIX Review,
Feb-March 1984 (vol. 2 #1), pp. 94-100 and 123.  I found it very
instructive.

Dave Sherman
Toronto
-- 
{utzoo pesnta nrcaero utcs hcr}!lsuc!dave
{allegra decvax ihnp4 linus}!utcsri!lsuc!dave



More information about the Comp.lang.c mailing list