Re: Speed of lex generated scanners???

peter@csg.uwaterloo.ca (Peter Bumbulis)
Mon, 30 May 1994 13:25:06 GMT

          From comp.compilers

Related articles
Speed of lex generated scanners??? rtrigg@crl.com (1994-05-26)
Re: Speed of lex generated scanners??? bazyar@netcom.com (1994-05-29)
Re: Speed of lex generated scanners??? wgsteven@undergrad.math.uwaterloo.ca (1994-05-30)
Re: Speed of lex generated scanners??? peter@csg.uwaterloo.ca (1994-05-30)
Re: Speed of lex generated scanners??? michi@km21.zfe.siemens.de (1994-06-01)
Re: Speed of lex generated scanners??? euambn@eua.ericsson.se (1994-06-06)
| List of all articles for this month |
Newsgroups: comp.compilers
From: peter@csg.uwaterloo.ca (Peter Bumbulis)
Keywords: lex, performance
Organization: University of Waterloo
References: 94-05-114
Date: Mon, 30 May 1994 13:25:06 GMT

>[re performance of lex and flex scanners]


You might also want to check out re2c; an alpha version is available for
anonymous ftp:


ftp://csg.uwaterloo.ca/pub/peter/re2c.0.5.tar.gz


re2c generates directly executable code instead of tables. Not only does
this provide greater flexibility, but also results in very fast scanners.
On x86 architectures (using a decent C compiler) an "re2c -b"-based C
scanner is not only faster than an equivalent "flex -Cf" scanner but
smaller than the corresponding "flex -Cem" scanner. Some benchmark
results are provided in an upcoming LOPLAS article (included in the above
mentioned tar file.) These results should be used with a grain of salt:
slight modifications to the flex specifications will result in faster
scanners; additional optimizations to the re2c generated code (in
particular the -b option) made after the article was submitted for
publication have resulted in even better performance for re2c-based
scanners. The source for the benchmarks is also available for ftp:


ftp://csg.uwaterloo.ca/pub/peter/sampler.tar.gz


re2c is in the public domain.


Peter
--


Post a followup to this message

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