[Top][All Lists]

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

Re: master e315544: ; * src/fileio.c (Fdirectory_append): Doc fix.

From: Michael Albinus
Subject: Re: master e315544: ; * src/fileio.c (Fdirectory_append): Doc fix.
Date: Wed, 28 Jul 2021 19:28:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

Hi Lars,

>>> This should probably emphasize the fact that it ignores file name
>>> handlers.
>> The NEWS entry specifically, or the docstring and/or info entry?
> I'm not entirely confident that it'll keep ignoring file name handlers,
> so the less said the better.

If you want file-name-concat being well optimized, you shall not use
file name handlers:

--8<---------------cut here---------------start------------->8---
 (let (file-name-handlers)
   (concat (file-name-as-directory "/tmp") "foo")))
=> "Elapsed time: -0.000004s"

 (let nil
   (concat (file-name-as-directory "/tmp") "foo")))
=> "Elapsed time: 0.000049s"
--8<---------------cut here---------------end--------------->8---

It's not heavy in terms of absolute time, but still a factor of 10.

Best regards, Michael.

reply via email to

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