From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: Improving Emacs performance on Cygwin Date: Tue, 27 Jul 2010 13:01:07 -0700 (PDT) Message-ID: <45099.130.55.118.19.1280260867.squirrel@webmail.lanl.gov> References: <4C4DF756.8030604@cornell.edu> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1280260891 3089 80.91.229.12 (27 Jul 2010 20:01:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Jul 2010 20:01:31 +0000 (UTC) Cc: emacs-devel To: "Ken Brown" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 27 22:01:30 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OdqLC-0008U9-Ae for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 22:01:30 +0200 Original-Received: from localhost ([127.0.0.1]:48864 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdqLB-0005pm-Th for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 16:01:29 -0400 Original-Received: from [140.186.70.92] (port=32771 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdqL2-0005ol-GQ for emacs-devel@gnu.org; Tue, 27 Jul 2010 16:01:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdqL1-0002Q8-12 for emacs-devel@gnu.org; Tue, 27 Jul 2010 16:01:20 -0400 Original-Received: from proofpoint2.lanl.gov ([204.121.3.26]:48203) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdqL0-0002Pg-Lz for emacs-devel@gnu.org; Tue, 27 Jul 2010 16:01:18 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id o6RKP3dj019427; Tue, 27 Jul 2010 14:25:03 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id F28F41140156; Tue, 27 Jul 2010 14:01:07 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id DEFE71140153; Tue, 27 Jul 2010 14:01:07 -0600 (MDT) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id DB4C21CA82A2; Tue, 27 Jul 2010 14:01:07 -0600 (MDT) Original-Received: from 130.55.118.19 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Tue, 27 Jul 2010 13:01:07 -0700 (PDT) In-Reply-To: <4C4DF756.8030604@cornell.edu> User-Agent: SquirrelMail/1.4.8-5.el5_4.10.lanl3 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.0.10011, 1.0.148, 0.0.0000 definitions=2010-07-27_07:2010-07-27, 2010-07-27, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127887 Archived-At: > I would like to apply the following patch, which seems to give a > substantial performance improvement on Cygwin (and obviously has no > effect on other platforms). > [...] > #define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0) > #else > #define DIRENTRY_NONEMPTY(p) ((p)->d_ino) How can looking up d_name[0] be any slower than looking up d_ino? They're both already in memory (d_name is an array, not a pointer, even); are we really seeing a "substantial performance improvement" from a cache effect or something? This is a question born of curiosity, not a criticism; so long as the relevant version of Cygwin is properly handled (as addressed elsewhere in the thread) simplifying the conditional is already a win. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.