caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Size of produced parser: menhir vs ocamlyacc
@ 2007-03-30 13:14 Joel Reymont
  2007-03-30 13:31 ` [Caml-list] " Francois Pottier
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Reymont @ 2007-03-30 13:14 UTC (permalink / raw)
  To: Caml List

_build/easy_parser.cmo -- ocamlyacc: 98,339,  menhir: 1,542,108
_build/easy_parser.ml  -- ocamlyacc: 323,729, menhir: 3,550,332

Compiling a parser with produced by ocamlyacc also takes a fraction  
of a second vs several seconds with menhir.

I hope parsers produced by menhir is just as fast as those produce by  
ocamlyacc during execution!


--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc
  2007-03-30 13:14 Size of produced parser: menhir vs ocamlyacc Joel Reymont
@ 2007-03-30 13:31 ` Francois Pottier
  2007-03-30 13:45   ` Markus Mottl
  0 siblings, 1 reply; 8+ messages in thread
From: Francois Pottier @ 2007-03-30 13:31 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Caml List


Hello,

On Fri, Mar 30, 2007 at 02:14:53PM +0100, Joel Reymont wrote:
> _build/easy_parser.cmo -- ocamlyacc: 98,339,  menhir: 1,542,108
> _build/easy_parser.ml  -- ocamlyacc: 323,729, menhir: 3,550,332
> 
> Compiling a parser with produced by ocamlyacc also takes a fraction  
> of a second vs several seconds with menhir.

This is because we compile automata down to code, whereas ocamlyacc compiles
them down to tables. Ideally, we should provide an option to compile down to
tables instead of code, but we never found time to do so.

> I hope parsers produced by menhir is just as fast as those produce by  
> ocamlyacc during execution!

We did not perform any serious measurements, but we believe that we are
competitive. If you run a comparison, we would be interested in knowing
about the results.

-- 
François Pottier
Francois.Pottier@inria.fr
http://cristal.inria.fr/~fpottier/


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc
  2007-03-30 13:31 ` [Caml-list] " Francois Pottier
@ 2007-03-30 13:45   ` Markus Mottl
  2007-03-30 13:51     ` Joel Reymont
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Mottl @ 2007-03-30 13:45 UTC (permalink / raw)
  To: Francois.Pottier; +Cc: Joel Reymont, Caml List

On 3/30/07, Francois Pottier <Francois.Pottier@inria.fr> wrote:
> > I hope parsers produced by menhir is just as fast as those produce by
> > ocamlyacc during execution!
>
> We did not perform any serious measurements, but we believe that we are
> competitive. If you run a comparison, we would be interested in knowing
> about the results.

I also haven't done any serious benchmarks, but I remember seeing
menhir beat ocamlyacc on some of my parsers.

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc
  2007-03-30 13:45   ` Markus Mottl
@ 2007-03-30 13:51     ` Joel Reymont
  2007-03-30 14:26       ` Markus Mottl
  0 siblings, 1 reply; 8+ messages in thread
From: Joel Reymont @ 2007-03-30 13:51 UTC (permalink / raw)
  To: Markus Mottl; +Cc: Francois.Pottier, Caml List


On Mar 30, 2007, at 2:45 PM, Markus Mottl wrote:

> I also haven't done any serious benchmarks, but I remember seeing
> menhir beat ocamlyacc on some of my parsers.

How complex were they?

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc
  2007-03-30 13:51     ` Joel Reymont
@ 2007-03-30 14:26       ` Markus Mottl
  2007-03-30 14:28         ` Joel Reymont
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Mottl @ 2007-03-30 14:26 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Francois.Pottier, Caml List

On 3/30/07, Joel Reymont <joelr1@gmail.com> wrote:
> How complex were they?

Not very.  S-expressions, etc.  But I wouldn't be surprised if Menhir
performs better on more complex parsers, too.  Generating parser code
rather than tables may boost performance.

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc
  2007-03-30 14:26       ` Markus Mottl
@ 2007-03-30 14:28         ` Joel Reymont
  2007-03-30 15:58           ` skaller
  2007-04-01  0:42           ` Markus Mottl
  0 siblings, 2 replies; 8+ messages in thread
From: Joel Reymont @ 2007-03-30 14:28 UTC (permalink / raw)
  To: Markus Mottl; +Cc: Francois.Pottier, Caml List


On Mar 30, 2007, at 3:26 PM, Markus Mottl wrote:

> Not very.  S-expressions, etc.  But I wouldn't be surprised if Menhir
> performs better on more complex parsers, too.  Generating parser code
> rather than tables may boost performance.

Why did you pick menhir over ocamlyacc? I assume it was to use it in  
server code but thought I would ask anyway.

	Thanks, Joel

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc
  2007-03-30 14:28         ` Joel Reymont
@ 2007-03-30 15:58           ` skaller
  2007-04-01  0:42           ` Markus Mottl
  1 sibling, 0 replies; 8+ messages in thread
From: skaller @ 2007-03-30 15:58 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Markus Mottl, Caml List

On Fri, 2007-03-30 at 15:28 +0100, Joel Reymont wrote:
> On Mar 30, 2007, at 3:26 PM, Markus Mottl wrote:
> 
> > Not very.  S-expressions, etc.  But I wouldn't be surprised if Menhir
> > performs better on more complex parsers, too.  Generating parser code
> > rather than tables may boost performance.
> 
> Why did you pick menhir over ocamlyacc? I assume it was to use it in  
> server code but thought I would ask anyway.

Note Ocamlyacc is LALR(1) whilst Menhir is LR(1).

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc
  2007-03-30 14:28         ` Joel Reymont
  2007-03-30 15:58           ` skaller
@ 2007-04-01  0:42           ` Markus Mottl
  1 sibling, 0 replies; 8+ messages in thread
From: Markus Mottl @ 2007-04-01  0:42 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Caml List

On 3/30/07, Joel Reymont <joelr1@gmail.com> wrote:
> Why did you pick menhir over ocamlyacc? I assume it was to use it in
> server code but thought I would ask anyway.

I just wanted to try it out.  I still use ocamlyacc by default, and
have actually implemented a hand-written parser for optimum
performance and flexibility.

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-04-01  0:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-30 13:14 Size of produced parser: menhir vs ocamlyacc Joel Reymont
2007-03-30 13:31 ` [Caml-list] " Francois Pottier
2007-03-30 13:45   ` Markus Mottl
2007-03-30 13:51     ` Joel Reymont
2007-03-30 14:26       ` Markus Mottl
2007-03-30 14:28         ` Joel Reymont
2007-03-30 15:58           ` skaller
2007-04-01  0:42           ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).