|
Boost Users : |
Subject: Re: [Boost-users] [Spirit] poor performance
From: Jens Weller (JensWeller_at_[hidden])
Date: 2009-11-20 14:49:43
> I just shocked to find out that my parser with Spirit-classic is 4x slower
> than my original ad-hoc parser. I do generate parsetree with pt_parse().
>
> So does my adhoc parser but my adhoc one generates its own custom parse
> tree.
>
>
>
> My question are:
>
>
>
> 1. Does spirit classic with generation of parse tree is known to be slow?
>
> 2. Does anyone have ever done perf study and compare Spirit.Classic with
> Spirit.Qi (assuming to generate custom parse tree in Spirit.Qi)?
>
> 3. If the bottleneck is in the Spirit.Classic parse tree generation, has
> anyone ever done a custom parse tree generation in Spirit.Classic?
>
> For now it seems I am hitting a roadblock to use Spirit as performance is
> my main issue. Your insight is highly appreciated.
Hi, you should consider switching to spirit2.1, as its shipped with boost 1.41.
I will quote a mail from Hartmut which has written to the list just a few days ago, for a few more details:
> > Using Boost.Spirit, when I group nodes with a leaf_node_d directive and
> > call parse_ast, it looks like I get a node whose value includes some
> > characters that are supposed to be skipped.
> >
> > My questions: am I missing anything? Is this intended? If yes, what am
> > I missing (again)? Is there a way to work around this?
> >
> > Here is a simple example program (it should compile and demonstrate
> > what I mean, with boost 1.39 and 1.40)
>
> The implementation of AST's in Spirit.Classic is known to be slow and
> buggy
> at times. That's one of the reasons why we developed Spirit 2 (now
> released
> with Boost 1.41, but usable with any Boost >= V1.37).
>
> You should consider switching to the new version!
> Regards Hartmut
regards
Jens Weller
-- Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.! http://portal.gmx.net/de/go/dsl02
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net