Boost logo

Boost Users :

Subject: Re: [Boost-users] multi_index_container insert is excruciatingly slow
From: joaquin_at_[hidden]
Date: 2011-03-08 02:03:43


Georges Dupret escribió:
> 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.
>

Can you provide a little more context? Maybe even a full test program
showing the
problem, or failing that some snippets of your code with the definition
of the container
and population algorithm?

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at.
http://www.tid.es/ES/PAGINAS/disclaimer.aspx


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