|
Boost : |
Subject: Re: [boost] [preprocessor] Computational complexity analysis
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2010-03-20 19:12:53
On Sat, Mar 20, 2010 at 5:52 PM, Jeffrey Hellrung <jhellrung_at_[hidden]> wrote:
> "Number of macro invocations" (as it depends on an argument) should be
Yes, "number of macro invocations" or "number of macro expansions"
(would these be the same??) should be a reasonable metric for the
preprocessing time and it should be abstracted enough from the
preprocessor implementation specifics.
> immediately inferred from a quick glance through the code. E.g.,
> BOOST_PP_SEQ_ELEM( n, seq ) requires O(n) macro invocations, and
> BOOST_PP_TUPLE_ELEM( n, k, tuple ) (in terms of which BOOST_PP_ARRAY_ELEM is
> implemented) requires O(1) macro invocations. Of course, Boost.PP
What about other operations? BOOST_PP_ARRAY_PUSH_BACK(), the
PP_ARRAY_INSERT/REMOVEs/POPs, the PP_SEQ_FOLDs, PP_ENUM, PP_WHILE,
PP_REPEAT, ...
Thanks a lot.
Lorenzo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk