Boost logo

Boost Users :

Subject: Re: [Boost-users] [Spirit] poor performance
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-11-20 14:57:00


> 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)?

Spirit1 AST's are known to be slow, buggy and designed adhoc. We have
highlighted that more than once here and on other lists.
The implementation was not fixable without any radical redesign from the
grounds up. That's one of the reasons we rewrote Spirit from scratch (see:
http://spirit.sourceforge.net/home/?p=530). So please don't use Spirit 1
anymore, especially not for new projects.

> 3. If the bottleneck is in the Spirit.Classic parse tree generation,
> has anyone ever done a custom parse tree generation in Spirit.Classic?

Not that I know of. But before doing that please consider reimplementing
your parsers in Spirit V2 instead (released with Boost V1.41, but usable
with any Boost >= V1.37, see here:
http://spirit.sourceforge.net/home/?page_id=369)

> For now it seems I am hitting a roadblock to use Spirit
> as performance is my main issue. Your insight is highly appreciated.

Regards Hartmut

-------------------
Meet me at BoostCon
http://boostcon.com


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