
On Fri, Sep 28, 2012 at 9:03 AM, Matt Calabrese <rivorus@gmail.com> wrote:
On Fri, Sep 28, 2012 at 5:18 AM, Lorenzo Caminiti <lorcaminiti@gmail.com>wrote:
Honestly, I didn't even try to profile/optimize Boost.Contract pp code yet. I'm not sure if I'll try to count the number of macro expansions, the depth of macro expansion, etc... maybe using clang or Eclipse... I don't know yet.
I didn't use it at the time, but Boost.Wave should be able to help a lot with that. It has pragmas for tracing the macro expansion process and for timing. With _Pragma, it should even be possible to trace and time individual parts of a single overall macro expansion. http://www.boost.org/doc/libs/1_51_0/libs/wave/doc/supported_pragmas.html
Cool! I'll keep it in mind for when I start Boost.Contract profiling and optimization. It probably makes sense to profile and optimize on a couple of pp and compilers anyways (because most of the pp and template meta-programming code will likely perform differently on different platforms) so maybe Wave, GCC, and MSVC... Thanks. --Lorenzo