Unordered container insertion hints

Paolo Carlini paolo.carlini@oracle.com
Thu May 23 23:00:00 GMT 2013


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.



More information about the Gcc-patches mailing list