How to benchmark Boost Spirit Parser?

I have given things a quick scan. My profiler quickly told me that constructing the grammar and (especially) the lexer object took quite some resources. Indeed, just changing a single line in SpiritParser.cpp saved 40% of execution time1 (~28s down to ~17s): lexer::Lexer lexer; into static const lexer::Lexer lexer; Now, making the grammar static involves … Read more