From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27508 invoked by alias); 5 Oct 2012 22:08:23 -0000 Received: (qmail 27497 invoked by uid 22791); 5 Oct 2012 22:08:22 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-ie0-f175.google.com (HELO mail-ie0-f175.google.com) (209.85.223.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Oct 2012 22:08:16 +0000 Received: by mail-ie0-f175.google.com with SMTP id c13so5725320ieb.20 for ; Fri, 05 Oct 2012 15:08:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=IM5WmSdE8OfSbQ3y1kjl7U/bn+S5DAIgUnbsBMXXfsw=; b=m2+cn+MwZ1+tTmKX5tKtcd4cMb6mNm5XipAr3cEwyCOL8UzmPdbF5cbzfXB99hXqe7 kw+4LPMqwd8elXHsuxh2Whbl7MdfskByRjwX/7/cxqJWk3dVGuMZJxqzcxpJjHXO2cmY /eJcagB4TAlqz6/KbNsULKG/3V+DgXYem6++5u9aOioktNCv/yIrF/GuDX0tQSuGQFox S38t2Il4b+CQP5zafq0X519cb97yOT2IuqLQIW8iEkEe+kNVfFcz4YJZzE2N0Kj/RvSA 436PD2TVzlqA6BDF4aC4XzqrPjE/eidpTLbYEfOq3v/9UHIC5yjwVFYFQhOc0b9YMHH7 sDgg== MIME-Version: 1.0 Received: by 10.50.197.231 with SMTP id ix7mr2477628igc.54.1349474895773; Fri, 05 Oct 2012 15:08:15 -0700 (PDT) Received: by 10.231.72.19 with HTTP; Fri, 5 Oct 2012 15:08:15 -0700 (PDT) In-Reply-To: <20121005211617.GM1787@tucnak.redhat.com> References: <20121005211617.GM1787@tucnak.redhat.com> Date: Fri, 05 Oct 2012 22:08:00 -0000 Message-ID: Subject: Re: Convert more non-GTY htab_t to hash_table. From: Lawrence Crowl To: Jakub Jelinek Cc: Richard Guenther , gcc-patches List , Diego Novillo Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQmQN9iT08eTqTpi6osKHY8RCr1iUBRcvxjEOz8qVD9gTL1cqc60YQO2nyyqqSO+pY9U3it+JWoe8a31gmbz7FPQ97Sa+NpmvI1OclwjQFg16+KuJmxV5qX1DswWXjq5hQuwHfLuMwdaLe+zt9oaJV2yfX1Kq9Gev+xwDFiQEAOW6Gjkas9VEP8BSTRHwpCUJy5TgnlY X-IsSubscribed: yes 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 X-SW-Source: 2012-10/txt/msg00574.txt.bz2 On 10/5/12, Jakub Jelinek wrote: > On Fri, Oct 05, 2012 at 01:59:18PM -0700, Lawrence Crowl wrote: > > With the constructor, you don't have to remember and you don't > > have to type more. If you have a variable, you know that it is > > properly initialized. > > But we really don't want hundreds or thousands of dynamic > constructors for global variables. Nothing I have written requires a dynamic initializer for global variables. It may be that a dynamic initializer is the easiest implementation. If the cost is significant, we can fix it by applying the optimization, which would benefit our customers in addition to us. > For many people the time to compile (almost) empty file is very > important, we are already bad about that right now, initializing > too much stuff dynamically is going to make it worse. So far, we are looking at dynamic initializations that would take about 10 cycles. Even on a slow processor, a thousand initializations would take a microsecond. Our time reports don't even report anything less than 5 milliseconds. Is there any reason to believe that this anticipated static initialization overhead is not pretty low relative to other overhead? I'm thinking here of the fact that to even start, the driver launches cc1[plus] which has to parse all the options created by the driver. -- Lawrence Crowl