From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20180 invoked by alias); 23 May 2013 23:00:31 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 20162 invoked by uid 89); 23 May 2013 23:00:30 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_MED,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 23 May 2013 23:00:30 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r4NN0Pbp030473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 May 2013 23:00:26 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4NN0QEB003987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 23 May 2013 23:00:27 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4NN0QXo009503; Thu, 23 May 2013 23:00:26 GMT Received: from poldo4.casa (/79.33.223.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 23 May 2013 16:00:26 -0700 Message-ID: <519E9F88.3010309@oracle.com> Date: Thu, 23 May 2013 23:00:00 -0000 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Fran=E7ois_Dumont?= CC: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: Unordered container insertion hints References: <5193E6AE.8020306@gmail.com> <519E75B2.4040000@gmail.com> In-Reply-To: <519E75B2.4040000@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg01429.txt.bz2 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.