Re: Multibyte/Wide Character Sets and Lex.

fjh@cs.mu.OZ.AU
13 Feb 1996 18:03:51 -0500

          From comp.compilers

Related articles
Multibyte/Wide Character Sets and Lex. juliano@SYDPO4.AUS.unisys.com (Orbach, Julian ACUS) (1996-02-09)
Re: Multibyte/Wide Character Sets and Lex. colas@aye.inria.fr (1996-02-09)
Re: Multibyte/Wide Character Sets and Lex. sharris@fox.nstn.ca (Sandy Harris) (1996-02-10)
Re: Multibyte/Wide Character Sets and Lex. schwartz@galapagos.cse.psu.edu (1996-02-12)
Re: Multibyte/Wide Character Sets and Lex. pjbumbul@math.uwaterloo.ca (1996-02-13)
Re: Multibyte/Wide Character Sets and Lex. fjh@cs.mu.OZ.AU (1996-02-13)
Re: Multibyte/Wide Character Sets and Lex. peter@csgrs6k1.uwaterloo.ca (1996-02-14)
Re: Multibyte/Wide Character Sets and Lex. mparks@oz.net (Michael Parkes) (1996-02-14)
Re: Multibyte/Wide Character Sets and Lex. jfc@mit.edu (1996-02-14)
| List of all articles for this month |
From: fjh@cs.mu.OZ.AU
Newsgroups: comp.compilers
Date: 13 Feb 1996 18:03:51 -0500
Organization: Compilers Central
References: 96-02-065 96-02-115
Keywords: lex, optimize

pjbumbul@math.uwaterloo.ca (Peter Bumbulis) writes:
>re2c can translate switch statements into nested ifs (usually a
>performance win.)


Why is this usually a performance win? If it is a performance win,
why don't compilers do it automatically?


--
Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
[C compilers I know have three strategies for translating switches: a
branch table if the cases are dense, a linear lookup if there's a
small number of sparse cases, and an open-coded binary tree,
i.e. nested if's, otherwise. -John]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.