John Levine <jo...@iecc.com> wrote: > In article > <camk0+vvsk082jz_c_uc7moforfmk+katvx423rs4xvkt7wh...@mail.gmail.com> 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. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison