Boost logo

Boost Users :

Subject: Re: [Boost-users] More than strange performance test results of Boost.MultiIndex
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2014-11-18 09:51:56


On Tue, Nov 18, 2014 at 8:31 AM, Ernest Zaslavsky <
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