multi_index_container insert is excruciatingly slow

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

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

On Tue, 08 Mar 2011 01:00:18 +0100, Georges Dupret
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

On 1:59 PM, Georges Dupret wrote:
[...]
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:
[...]
in the header calling the multi_index_container, but I see no change.
How many and what kind of indices (indexes) are you using? How complicated are your elements?
participants (4)
-
Georges Dupret
-
Jim Bell
-
joaquin@tid.es
-
Viatcheslav.Sysoltsev@h-d-gmbh.de