Re: what scanner scheme is efficient?

James Mansion <james@wgold.demon.co.uk>
24 Oct 1996 22:37:52 -0400

          From comp.compilers

Related articles
what scanner scheme is efficient? lloix@star.spb.ru (1996-10-12)
Re: what scanner scheme is efficient? peter@bj-ig.de (1996-10-15)
Re: what scanner scheme is efficient? ramb@primenet.com (Ram Bhamidipaty) (1996-10-16)
Re: what scanner scheme is efficient? peter@peter.bj-ig.de (Peter Brueckner) (1996-10-18)
Re: what scanner scheme is efficient? roth@noel.cs.rice.edu (1996-10-20)
Re: what scanner scheme is efficient? jsgray@acm.org (Jan Gray) (1996-10-20)
Re: what scanner scheme is efficient? clark@quarry.zk3.dec.com (1996-10-24)
Re: what scanner scheme is efficient? james@wgold.demon.co.uk (James Mansion) (1996-10-24)
Re: what scanner scheme is efficient? jlilley@empathy.com (1996-10-30)
Re: what scanner scheme is efficient? vern@daffy.ee.lbl.gov (1996-11-12)
Re: what scanner scheme is efficient? jlilley@empathy.com (1996-11-15)
Re: what scanner scheme is efficient? adrian@dcs.rhbnc.ac.uk (1996-11-19)
Re: what scanner scheme is efficient? vern@daffy.ee.lbl.gov (1996-11-21)
Re: what scanner scheme is efficient? adrian@dcs.rhbnc.ac.uk (1996-11-24)
[1 later articles]
| List of all articles for this month |

From: James Mansion <james@wgold.demon.co.uk>
Newsgroups: comp.compilers
Date: 24 Oct 1996 22:37:52 -0400
Organization: Westongold Ltd
References: 96-10-076 96-10-081 96-10-097
Keywords: lex, performance

Jerry Roth wrote:
> I posed a question to this news group when I was a TA for a compiler
> class that was almost identical to the original question. The response
> then was that if *speed* is the issue it is better to put your
> keywords into your grammar and have the scanner recognize them than it
> is to use a hash table. Of course other issues besides speed
> (ie, maintainability or table size) may dictate a different approach.


Surely cache misses will start to become a major problem, and you
might be better trying to scan the whole text and then start the parse,
with a smallish working set. Hard to do if the tables are large,
even if they don't blow overall size constraints on the system.


Of course, scanning on demand from calls from the parser doesn't
do much for working set size. ;-)


James
--


Post a followup to this message

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