From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109440 invoked by alias); 25 May 2017 19:17:10 -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 109408 invoked by uid 89); 25 May 2017 19:17:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:93dc, cheap, rare X-HELO: mail-yw0-f177.google.com Received: from mail-yw0-f177.google.com (HELO mail-yw0-f177.google.com) (209.85.161.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 May 2017 19:17:08 +0000 Received: by mail-yw0-f177.google.com with SMTP id l74so107877512ywe.2 for ; Thu, 25 May 2017 12:17:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bKi+sf/B9Dkcw0kGxCSMMSzh//pnDNctaXzKIAqwGDo=; b=V9aW8LBIbImS/q57kNHk5gu2+zRoi1y537l73rtCpyZN770FBB3BKMeaoNDtxtb9R5 Z2Z/9q0uAJ+LwPiODTaF3Q9csjDJJfHUG3byL6DHv7KZElYxY52mUAto03aocGE2xITj KbZ507UM8CPxNvHT02GbMDbT44HlGTR/HAkNIXSQbdK/ncqa+M+SslmcjdNN8sYPkvZo NjRb0+HetUJONPZVX3oij2hWpFtyebnP6NoL9ChNWiZeWYb7umNSmg3RtM9t+yxXQ76K PQZ7a/1wXpJRWQ8xOER/zfiqb6RvRC/MAzvuFqymUylOSL4O0vfuY1tMw4QAjdODCfDP umWw== X-Gm-Message-State: AODbwcB+WvuRGY6HUK43hGCx3nfV6BQevBvNMWci+hyqdge0aSgfdLS6 bYHQZIXs9FZpbw== X-Received: by 10.13.196.4 with SMTP id g4mr13218099ywd.193.1495739830584; Thu, 25 May 2017 12:17:10 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:f6d0:5ac5:64cd:f102? ([2620:10d:c091:200::2:a1d1]) by smtp.googlemail.com with ESMTPSA id f123sm3494798ywd.4.2017.05.25.12.17.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 May 2017 12:17:10 -0700 (PDT) Subject: Re: [C++ PATCH] Reimplement ADL To: gcc-patches@gcc.gnu.org References: <4f2b3ce9-7f06-6a10-f1c9-4542b3651bd0@acm.org> From: Nathan Sidwell Message-ID: Date: Thu, 25 May 2017 19:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-05/txt/msg01984.txt.bz2 On 05/25/2017 03:07 PM, Jason Merrill wrote: >> The recursion is a rare event, so we optimize the non-recursive case. > > Sounds like it would make sense to use a hash_set rather than flags on > the decls. I don't think that would be a win. Although both are O(1), the constant factor is greater for the hash_set. As I said, it is rare -- I think there was only once instance in building libstdc++ or in its testsuite, I can't recall which. The cost of fixing it up is pretty cheap anyway -- iterate over the vector of seen scopes. nathan -- Nathan Sidwell