Some may know I'm an avid Boost fan. I recently redesigned a library to use some concepts I recently learned about. Among searching for a parser, I found: http://alexott.blogspot.com/2010/01/boostspirit2-vs-atoi.html
Boost Spirit 2 (not Classic) highly out-benchmarks atoi and atol anyday :P. There's also something inside of sandbox called coerce_cast that uses the exact same form as lexical_cast that uses Boost Spirit 2 to do the same shown in this example.
The executable size is increased slightly because of the heavy use of templates. But is that really a reason not to enjoy the speed boost? What do you think? I think I'll use Boost Spirit 2 every time a parsing need comes along :P
I am to an extent. But it is true that Boost.Spirit highly outperforms atoi, atol, and various other conversion and parsing techniques just by design. It's also true that it greatly increases the binary size -.-.
Ensure that you are comparing stripped binary sizes. Unstripped, yes, absolutely it will increase the binary size _by a lot_.
The big disadvantage to Spirit (at least in Classic, but I don't think it changed with v2) is compile times. (Ok, the learning curve is a disadvantage too).
Yeah, it probably got worse actually. But come now, use of separate translation units can easily fix that :D. For anything large, it gets ridiculous though... I sometimes wonder though if spirit can out perform other parser generators (although Spirit isn't a parser generator, it's one of a kind as far as I can see).
Doesn't it make the compiler behave as a parser generator? So it would be a partial compiler compiler specification (the other part being the Standard).
Anecdotes say that it can take an hour to compile a single source file that includes a spirit grammar. At that rate, yeah, you better not include that grammar in more than one cpp file.