From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: dired and ls Date: Sun, 21 Feb 2016 13:10:41 +1100 Message-ID: <87h9h2ke3i.fsf@gnus.org> References: <87povs41xg.fsf@gnus.org> <87bn7c3yms.fsf@gnus.org> <87mvqvewk6.fsf_-_@gnus.org> <83k2lzpuuj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456020694 27609 80.91.229.3 (21 Feb 2016 02:11:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Feb 2016 02:11:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 21 03:11:24 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aXJUY-0002s5-PE for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 03:11:22 +0100 Original-Received: from localhost ([::1]:37157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXJUX-0001Gq-UL for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 21:11:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXJUU-0001Gb-9P for emacs-devel@gnu.org; Sat, 20 Feb 2016 21:11:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXJUM-00054g-Pz for emacs-devel@gnu.org; Sat, 20 Feb 2016 21:11:13 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:42613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXJUM-00054U-JG; Sat, 20 Feb 2016 21:11:10 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aXJTz-0004s7-Eo; Sun, 21 Feb 2016 03:10:48 +0100 In-Reply-To: <83k2lzpuuj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 20 Feb 2016 11:57:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aXJTz-0004s7-Eo MailScanner-NULL-Check: 1456625448.2632@KVCl7YukCZFp47ir80PhNA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200347 Archived-At: Eli Zaretskii writes: >> If we instead had `directory-files-with-attributes' in C, we could just >> do what "ls" does, which is... opening the directory, reading it, and >> then statting all the files. > > ls-lisp already uses directory-files-with-attributes. Aha. I didn't know about `directory-files-and-attributes'. And it, indeed, just reads the directory and then stats all the files... >> So it should be just as fast? I think? > > You should measure it, instead of trying to reason about that. IME, > reasoning about relative timings of programs is never a good idea, > because measurements always produce surprising results. Sure. But it helps talking about stuff before starting to do the real work... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no