Related articles |
---|
[2 earlier articles] |
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) |
From: | jfc@mit.edu (John Carr) |
Newsgroups: | comp.compilers |
Date: | 14 Feb 1996 21:30:11 -0500 |
Organization: | Massachusetts Institute Of Technology |
References: | 96-02-065 96-02-135 |
Keywords: | lex, optimize |
>re2c can translate switch statements into nested ifs (usually a
>performance win.)
<fjh@cs.mu.OZ.AU> wrote:
>Why is this usually a performance win? If it is a performance win,
>why don't compilers do it automatically?
If the program generating the source code knows the probability
distribution of the value tested, it can optimize for the common case
(e.g. end-of-file and NUL are rare in text files, but a parser should
still be able to handle them).
--
John Carr (jfc@mit.edu)
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.