From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27129 invoked by alias); 17 Mar 2006 13:23:44 -0000 Received: (qmail 27117 invoked by uid 22791); 17 Mar 2006 13:23:43 -0000 X-Spam-Check-By: sourceware.org Received: from mta09-winn.ispmail.ntl.com (HELO mtaout03-winn.ispmail.ntl.com) (81.103.221.49) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Mar 2006 13:23:39 +0000 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20060317132337.YZNI27969.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Fri, 17 Mar 2006 13:23:37 +0000 Received: from zapata.pink ([82.6.101.32]) by aamtaout01-winn.ispmail.ntl.com with ESMTP id <20060317132337.JLUO20480.aamtaout01-winn.ispmail.ntl.com@zapata.pink> for ; Fri, 17 Mar 2006 13:23:37 +0000 Received: from zapata.pink (localhost.localdomain [127.0.0.1]) by zapata.pink (8.13.1/8.13.1) with ESMTP id k2HDNWHB009262; Fri, 17 Mar 2006 13:23:32 GMT Received: (from aph@localhost) by zapata.pink (8.13.1/8.13.1/Submit) id k2HDNVxw009259; Fri, 17 Mar 2006 13:23:31 GMT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17434.47187.361448.53803@zapata.pink> Date: Fri, 17 Mar 2006 13:23:00 -0000 From: Andrew Haley To: Bob Rossi Cc: Brian Budge , gcc-help@gcc.gnu.org Subject: Re: efficiency In-Reply-To: <20060317020648.GF30980@brasko.net> References: <20060317014953.GE30980@brasko.net> <5b7094580603161758x54bb9f11ld515e5069933145@mail.gmail.com> <20060317020648.GF30980@brasko.net> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg00129.txt.bz2 Bob Rossi writes: > On Thu, Mar 16, 2006 at 05:58:29PM -0800, Brian Budge wrote: > > Hi - > > > > This is not really a gcc question, and it should really be asked > > elsewhere... however, it's unlikely that this occasional dereference > > will adversely affect performance. > > OK, where should a question like this be asked? if not the compiler that > does the optimization? I agree with you, Bob -- it's a perfectly reasonable question. > I forgot to mention, I only really care about the efficiency > regarding gcc's output. Well, if you really want to know, use "gcc -S". Access to a local is something like movl 8(%ebp), %eax and to a global via a pointer movl sfoo, %eax movl 4(%eax), %eax Andrew.