From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel Subject: Re: Improving Emacs performance on Cygwin Date: Tue, 27 Jul 2010 16:30:00 -0400 Message-ID: <4C4F41C8.5070304@cornell.edu> References: <4C4DF756.8030604@cornell.edu> <45099.130.55.118.19.1280260867.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280262607 9401 80.91.229.12 (27 Jul 2010 20:30:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Jul 2010 20:30:07 +0000 (UTC) Cc: emacs-devel To: "herring@lanl.gov" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 27 22:30:06 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 1Odqmr-0004uA-Hf for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 22:30:05 +0200 Original-Received: from localhost ([127.0.0.1]:43073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Odqmq-0002MN-Qk for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 16:30:04 -0400 Original-Received: from [140.186.70.92] (port=37269 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Odqmj-0002IX-Rg for emacs-devel@gnu.org; Tue, 27 Jul 2010 16:29:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Odqmi-0006V9-P5 for emacs-devel@gnu.org; Tue, 27 Jul 2010 16:29:57 -0400 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141]:53567 helo=authusersmtp.mail.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Odqmi-0006Uu-Ko for emacs-devel@gnu.org; Tue, 27 Jul 2010 16:29:56 -0400 Original-Received: from [128.84.234.191] (markov.math.cornell.edu [128.84.234.191]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id o6RKTtON002403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 27 Jul 2010 16:29:55 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 In-Reply-To: <45099.130.55.118.19.1280260867.squirrel@webmail.lanl.gov> X-detected-operating-system: by eggs.gnu.org: Solaris 9 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:127888 Archived-At: On 7/27/2010 4:01 PM, Davis Herring wrote: >> 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? I don't know. > 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. My initial motivation was just to simplify the code and get rid of an unnecessary special case for Cygwin. I then thought I observed a performance improvement, but I could be wrong. I didn't make any measurements. Ken