Boost logo

Boost Users :

Subject: Re: [Boost-users] More than strange performance test results of Boost.MultiIndex
From: Ernest Zaslavsky (ernest.zaslavsky_at_[hidden])
Date: 2014-11-19 00:00:55


Nah, I know ☺ It was taking ages to populate test data when I was generating it really random. Actually It doesn’t really matter since it may happen in production – you will have 5-15 strings across 1M of objects.


From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Dominique Devienne
Sent: Tuesday, November 18, 2014 4:52 PM
To: boost-users
Subject: Re: [Boost-users] More than strange performance test results of Boost.MultiIndex

On Tue, Nov 18, 2014 at 8:31 AM, Ernest Zaslavsky <ernest.zaslavsky_at_[hidden]<mailto:ernest.zaslavsky_at_[hidden]>> wrote:
[...]. Then when running performance tests I've noticed that once I use composite_key which includes string the performance drops in orders of magnitude, to be precise, 5 orders.

Do you have a requirement to return the wstring by value? Why not by const&? Goes back to Lars' COW string remark.

Also, your "random" string is not random at all, but constant in fact. Isn't that a pathological case?

Unless your indexed members change often, you could also cache the hash. Especially if your string can be long. --DD



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