Re: [Boost-users] Spirit 1.39 compilation times (avi)
Can someone explain why the compilation times are faster under Spirit2.1 I have noticed that even boost 1.39 references spirit qi, can I assume that faster compile times are due to moving from spirit classic to spirit qi ? More importantly can we intermix classic and qi grammars, if not are there any migration notes, to help users -- Best regards, Ta, Avi
Avi Bahra wrote:
Can someone explain why the compilation times are faster under Spirit2.1
Spirit 2.0 was the first crack at implementing Spirit on top of Boost.Proto. I'd say that in that version Spirit wasn't taking the best advantage of Proto, and compile times suffered. In Spirit 2.1, many O(N) template constructs were replaced with O(1), leading to better compile times.
I have noticed that even boost 1.39 references spirit qi, can I assume that faster compile times are due to moving from spirit classic to spirit qi ?
No, see above.
More importantly can we intermix classic and qi grammars, if not are there any migration notes, to help users
I'd say not to mix spirit 2 and spirit classic. But Joel can correct me if I'm wrong. -- Eric Niebler BoostPro Computing http://www.boostpro.com
Can someone explain why the compilation times are faster under Spirit2.1
Spirit2.1 is a complete rewrite of Spirit2. It has been designed with compilation times in mind to overcome the heavy compilation requirements of V2.
I have noticed that even boost 1.39 references spirit qi, can I assume that faster compile times are due to moving from spirit classic to spirit qi ?
Overall, Spirit2.1 (i.e. Spirit.Qi) requires longer compilation times than Spirit.Classic (1.x), still. OTOH the created parsers are faster than those created by Spirit.Classic. Additionally, Spirit2.1 grammars are more easy to modularize. Fair tradeoffs, as usual... So the answer is no.
More importantly can we intermix classic and qi grammars, if not are there any migration notes, to help users
Don't mix Spirit2.1 and Spirit.Classic in a single grammar. It is possible to mix and match both in an application as long as they are used in different grammars, though. Regards Hartmut
participants (3)
-
Avi Bahra
-
Eric Niebler
-
Hartmut Kaiser