Boost logo

Boost Users :

Subject: Re: [Boost-users] large variant performance compared (50 elements)
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-01-07 20:17:01


AMDG

On 1/7/2011 2:45 PM, Paul wrote:
> In a project we are using variants holding shared_ptr's. These
> variants are typically 20 items large but are growing as the project
> progresses. Now it seems that each time we add elements, we fall into
> issue's regarding excessive compilation time, huge pdb file or out of
> heap space errors on the compiler or linker.
>
> I took some time to compare various approaches using variants, here
> are the results:

Looks like there's quadratic behavior.

Total instantiations: 45697
                                                                                            Location count cum.
-----------------------------------------------------------------------------------------------------------------------
                                                             
..\trunk\boost/variant/variant.hpp(666) 9604 9604
                                                             
..\trunk\boost/variant/variant.hpp(627) 9604 19208
                                              
..\trunk\boost/variant/detail/visitation_impl.hpp(163) 4949 24157
                                              
..\trunk\boost/variant/detail/visitation_impl.hpp(140) 4949 29106

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net