|
Boost : |
From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-09-02 08:24:11
"Peder Holt" <peder.holt_at_[hidden]> wrote
> The problem with this is compile times. As the message thread specified
above.
> This will causes the preprocessor to generate a lot of code (for
> vector1,vector2,vector3,vector4 etc. etc), causing the compile times
> to plummet as the vector size goes up.
Note that this is done once per compilation unit (and can be easily taken
care of by the pre-compiled headers feature on the systems that support
them).
When considering performance we should clearly separate what's happenning
once per translation unit, and what's happenning on the per-typeof
invocation basis.
Please also note that your "compile-time variables" require to instantiate a
template (or maybe even 3 templates) every time a variable is set.
> Also, you force all users of typeof to work with very large mpl
> vectors.
I don't think so. As I said, I will most likely stop using
BOOST_MPL_LIMIT_VECTOR_SIZE, and use my own limit N to directly work with
mpl::vectorN<>.
And as far as I understand MPL, the fact that I am working with, e.g.,
mpl::vector256<> doesn't prevent other facilities in the same translation
unit from using mpl::vector3<>.
Regards,
Arkadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk