help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is handwritten faster?


From: Eric Wong
Subject: Re: Is handwritten faster?
Date: Fri, 2 Oct 2015 22:22:53 +0000

John Levine <address@hidden> wrote:
> In article <address@hidden> you write:
> >- yes, after tweaking, your manual parser will probably be faster.
> >- but that assumes you put all the necessary time into tweaking
> >- and you put in all the necessary time to get it functionally correct in
> >the first place
> >- but re-implementing Bison's nifty error unrolling is considered Extremely
> >Nontrivial.
> 
> A more important point is that the time spent in the parser is never
> significant.  If your compiler is simple, the bulk of the time is
> in the lexer since it has to touch each character in the input.  If
> your compiler is sophisticated, it'll spend a its time in analysis and
> optimization.

For scripting language implementations, I tend to disagree.

With the C implementation of Ruby, the parser usually shows up at
or near the top of profiles for short-lived scripts.

Hoping to learn more about Bison and speeding up Ruby's parsing
is why I started following this list, anyhow :)

git-svn (Perl) startup time is atrocious, too, profiling showed much of
that coming from the parser as well.  I am not at all familiar with Perl
internals, however.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]