
On 2/2/2010 4:56 PM, Edouard A. wrote:
Unfortunately, I forgot I spent a certain amount of time optimizing our custom parser to be a zero-copy, zero-allocation parser (not to mention a fair deal of mpl to have basically very little code at runtime). Basically, the current parser spits out a pair of read-only pointers for each block you want to work on when with Spirit the straightforward way implies creating a string, which means in many case making a dreaded memory allocation (yes, I have a problem with this :p).
I'm not sure what you mean by "the straightforward way implies creating a string". String for what? The attribute? The input? Spirit does not allocate any memory. Also, AFAIK, you can avoid using strings. Perhaps be more specific?
Maybe MSM is more suited for that kind of tasks. I also want to mention that I'm a noob when it comes to Spirit so perhaps with more magic one could achieve results closer to our custom parser. When our version one is released, I will work more on that custom parser vs MSM vs Spirit thingy and let you know.
Right off the bat, I'd say, don't use strings if you don't want to. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon