This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Unordered container insertion hints
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 24 May 2013 01:00:24 +0200
- Subject: Re: Unordered container insertion hints
- References: <5193E6AE dot 8020306 at gmail dot com> <519E75B2 dot 4040000 at gmail dot com>
On 05/23/2013 10:01 PM, François Dumont wrote:
Some feedback regarding this patch ?
Two quick ones: what if the hint is wrong? I suppose the insertion
succeeds anyway, it's only a little waste of time, right? Is it possible
that for instance something throws in that case and would not now (when
the hint is simply ignored)? In case, check and re-check we are still
conforming.
In any case, I think it's quite easy to notice if an implementation is
using the hint in this way or a similar one basing on some simple
benchmarks, without looking of course at the actual implementation code.
Do we have any idea what other implementations are doing? Like, eg, they
invented something for unordered_set and map too? Or a better way to
exploit the hint for the multi variants? Eventually I suppose we want to
add a performance testcase to our testsuite.
Thanks!
Paolo.