From: Ken Brown <kbrown@cornell.edu>
To: "herring@lanl.gov" <herring@lanl.gov>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Improving Emacs performance on Cygwin
Date: Tue, 27 Jul 2010 16:30:00 -0400 [thread overview]
Message-ID: <4C4F41C8.5070304@cornell.edu> (raw)
In-Reply-To: <45099.130.55.118.19.1280260867.squirrel@webmail.lanl.gov>
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
next prev parent reply other threads:[~2010-07-27 20:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 21:00 Improving Emacs performance on Cygwin Ken Brown
2010-07-26 21:56 ` Stefan Monnier
2010-07-27 2:55 ` Eli Zaretskii
2010-07-27 11:07 ` Ken Brown
2010-07-27 17:07 ` Eli Zaretskii
2010-07-27 18:01 ` Ken Brown
2010-07-27 19:12 ` Chad Brown
2010-07-27 19:53 ` Ken Brown
2010-07-27 20:01 ` Davis Herring
2010-07-27 20:30 ` Ken Brown [this message]
2010-07-29 19:39 ` Bazar trouble Alessandro Madruga Correia
2010-07-29 20:26 ` Óscar Fuentes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C4F41C8.5070304@cornell.edu \
--to=kbrown@cornell.edu \
--cc=emacs-devel@gnu.org \
--cc=herring@lanl.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).