emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master afc0bfd380: Speed up loaddefs-generate on slow disks


From: Eli Zaretskii
Subject: Re: master afc0bfd380: Speed up loaddefs-generate on slow disks
Date: Thu, 02 Jun 2022 19:16:00 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org, Paul Eggert <eggert@cs.ucla.edu>
> Date: Thu, 02 Jun 2022 17:20:43 +0200
> 
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> > I'm really surprised this is faster, even on slow disks.
> > Does anyone have a idea of why that is?

Isn't that clear?  file-newer-than-file-p calls 'stat' for both files,
and one of them is a loop invariant AFAIU.  Taking its time outside
the loop speeds up things (but perhaps not on GNU/Linux).

> I didn't actually benchmark it -- either way is fast on my laptop.  But
> the old autoloads code did it with time-less-p, and Eli said that it was
> faster, so...  Perhaps Eli can report back whether it made a difference
> or not.

It did -- for the better.  Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]