From: Jim Freeze Date: 2005-11-06T07:20:45+09:00 Subject: Re: parser performance comparisions On 11/5/05, Eric Mahurin wrote: > Other comparisons may be needed, but this one is very important. > > It says that Grammar can play equally with RACC in terms of speed, > > which is important if you are the new kid on the block. > > > > What I would like to see is grammar speed up a bit so that the > > one-token-at-a-time > > is as fast as Racc with the C extension. Then it would almost be a no > > brainer > > to use Grammar instead of Racc. > > Why is the one-token-at-a-time Grammar lexer important? If you already have > a Regexp lexer (for RACC or whatever), it is very easy to make it a lexer > for a Grammar parser - just make it an object that has a read1next method > (like a Cursor) - similar to next_token with yacc. Until I start generating > C code, it will be hard to compete against a Regexp lexer since it does > stuff in C. Memory consumption. From the data that you showed, it looks like I should avoid Regexp if I am concerned about memory usage. > Good work Eric. > > Thanks, Jim. Don't mention it. :) -- Jim Freeze