Boost logo

Boost Users :

Subject: Re: [Boost-users] [Multi-index container] Why insertions into my Multi-index container are so slow?
From: joaquin_at_[hidden]
Date: 2008-09-04 09:27:56


Hi Àngel,

Angel Sunye escribió:
> Hi everyone,
>
> I'm using a multi_index_container with 1 composite ordered_unique index
> and 1 hashed unique index. It have passed the unit tests perfectly, but
> when I have made the performance test, insertions into multi-index
> container
> went much slower than with a manual management. That grows exponentially
> with the number of insertions:
>
> 1000 insertions take 1.5 seconds, almost twice that without
> Multi-index library
> 10000 insertions take 160 seconds, thousands of times that without
> Multi-index library
>
> Below you can see my multi_index_container definition, and the insert
> calls
> that i have used.[...]

I don't see anything strange with your definitions... In order to try to
elucidate what's
going on, I'd need some more information:

* Are you using the safe mode and/or the invariant-checking mode
described at
  http://www.boost.org/libs/multi_index/doc/tutorial/debug.html ?
* Are you building in release or debug mode? Any difference if you
change this?
* You say you're comparing against manual management: can you please explain
  what this manual management consists in?
* What's your environment (compiler, OS)?
* Are you able to isolate this odd behavior in a complete program that
you can send
  to me so that I can reproduce the problem locally?

Hopefully some of these points can shed some light on the problem.
Looking fwd to
your answer,

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


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