Flex speedup

amorgan@Xenon.Stanford.EDU (Alan Morgan)
5 Feb 2000 18:52:56 -0500

          From comp.compilers

Related articles
Flex speedup amorgan@Xenon.Stanford.EDU (2000-02-05)
Re: Flex speedup rsherry@home.com (Robert Sherry) (2000-02-10)
| List of all articles for this month |

From: amorgan@Xenon.Stanford.EDU (Alan Morgan)
Newsgroups: comp.compilers
Date: 5 Feb 2000 18:52:56 -0500
Organization: Computer Science Department, Stanford University.
Keywords: lex, performance, question

I'm trying to squeeze all the performance I can out of flex (without
resorting to the "don't use flex" strategy"). I've compiled with the
magic flags and made some rules longer and now I'm looking at
backing-up states. Is there any way I can tell how much gain I will
see from eliminating them? Here is the information from -v:

    scanner options: -vB8 -CaF -Sflex.skl
    2333/3000 NFA states
    1512/2000 DFA states (3352 words)
    225 rules
    1119 backing-up (non-accepting) states
    28/40 start conditions
    845 epsilon states, 388 double epsilon states
    42/100 character classes needed 1056/1250 words of storage, 40 reused
    29878 state/nextstate pairs created
    2081/27797 unique/duplicate transitions
    1512/2000 base-def entries created
    39843/40000 (peak 0) nxt-chk entries created
    0/2500 (peak 0) template nxt-chk entries created
    0 empty table entries
    0 protos created
    0 templates created, 0 uses
    35 (216 saved) hash collisions, 625 DFAs equal
    26 sets of reallocations needed
    82710 total table entries needed

The 1119 backing-up states are actually 159 distinct states.

Any info will be appreciated.


Post a followup to this message

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