|Flex speedup amorgan@Xenon.Stanford.EDU (2000-02-05)|
|Re: Flex speedup firstname.lastname@example.org (Robert Sherry) (2000-02-10)|
|From:||Robert Sherry <email@example.com>|
|Date:||10 Feb 2000 01:17:26 -0500|
My experience with scanner generates is mixed. In general, I have
found that for production work a hand written scanner will run
If you are using flex and you want better performance I would
try to merge rules. Let me illustrate what I mean. Often you might
have one rule for identifiers, and one rule for each reserved word.
The assumption here, is that identifiers can not be reserved words. I
would merge those rules into one rule, and use some type of hashing
scheme. By the way, since the number of reserved words is fixed, I
have found that closed hashing will work better then open hashing in
I might be able to provide additional information, if I knew
more about the language you are tring to process. I hope this helps.
Alan Morgan wrote:
> I'm trying to squeeze all the performance I can out of flex (without
> resorting to the "don't use flex" strategy").
Return to the
Search the comp.compilers archives again.