Hi Jan,
Le 20/08/2016 à 15:36, Jan Kurš a écrit :
On the Smalltalk grammar, SmaCC is two times faster than PetitParser and Compiled PetitParser is four times faster. RBParser is like four point one times faster.
Impressive results.
Are you also changing the O() characteristics of the PetitParser-based parsers (i.e. that tendency to have performance/memory behavior based on the input length and not on the tree depth) ?
The SmaCC parsers are table driven, unless you rewrite SmaCC to produce top-down parsers, it will not reach the performance of RBParser or the parser compiled by PetitParser Compiler.
No. What you have to do with SmaCC is generate(*) a recursive ascent parser[1] instead of a table-driven parser.
Regards,
Thierry
[1] https://en.wikipedia.org/wiki/Recursive_ascent_parser (*) This is an exercice left to the reader :)
Cheers Jan
On Fri, Aug 19, 2016, 14:50 Johan Fabry <jfabry@dcc.uchile.cl mailto:jfabry@dcc.uchile.cl> wrote:
I did not read this before, but now I’m interested. Dory, when you say that 'the static parsers are significantly faster’ can you give some numbers on that? And you know what the numbers are compared to the compiled petitparsers of Jan and Jan ? (Their compiler is really cool BTW :-) I use it for LRP ) -- Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please see http://emailcharter.org . Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile > On Aug 19, 2016, at 07:02, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote: > > Le 14/8/16 à 22:31, Tudor Girba a écrit : >> Hi, >> >> PetitParser is a dynamic parser. SmaCC is a static parser. Both have their usages, and the static parsers are significantly faster. The speed problem of PetitParser will likely be significantly improved once we get the work of Jan on compiling parsers. _______________________________________________ Moose-dev mailing list Moose-dev@list.inf.unibe.ch <mailto:Moose-dev@list.inf.unibe.ch> https://www.list.inf.unibe.ch/listinfo/moose-dev
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev