Boost logo

Boost Users :

Subject: Re: [Boost-users] multi_index_container insert is excruciatingly slow
From: Viatcheslav.Sysoltsev_at_[hidden]
Date: 2011-03-08 03:17:38


On Tue, 08 Mar 2011 01:00:18 +0100, Georges Dupret
<georges.dupret_at_[hidden]> wrote:

> Hi!
>
> In spite of compiling with NDEBUG set:
>
> g++ -Wall -D_REENTRANT -msse2 -mfpmath=sse -Wno-deprecated -DNDEBUG -c
> -O3 -I/home/gdupret/.local/lib64/include/ -MMD -MP -MF
> build/Release/GNU-Linux-x86/Model.o.d -o
> build/Release/GNU-Linux-x86/Model.o Model.cpp,
>
> inserting into a multi_index_container is excruciatingly slow. I have a
> large nbr. of elements to insert (10^5) but even the first 1000 are very
> slow. I also set:
>
> #ifndef NDEBUG
> #define NDEBUG
> #endif
>
> #ifdef BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING
> #undef BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING
> #endif
>
> #ifdef BOOST_MULTI_INDEX_ENABLE_SAFE_MODE
> #undef BOOST_MULTI_INDEX_ENABLE_SAFE_MODE
> #endif
>
> in the header calling the multi_index_container, but I see no change.
>
> Any suggestion on how I should do?
>
> Best
>
> ge
>

Hi Georg,

Use any profiler available for the platform and review the bottlenecks.

-- Slava


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