GNU bug report logs -
#56355
29.0.50; Implement file-parent-directory
Previous Next
Reported by: daanturo <daanturo <at> gmail.com>
Date: Sat, 2 Jul 2022 11:07:01 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
About the comparator again, I hope that we use equal instead of file-equal-p.
The former gives far better performance.
Let my-parent-directory be a version of file-parent-directory with file-equal-p
replaced by equal, both are natively compiled.
```
(length recentf-list)
=> 659
(benchmark 1 '(mapcar 'my-parent-directory recentf-list))
=> "Elapsed time: 0.006954s"
(benchmark 1 '(mapcar 'file-parent-directory recentf-list))
=> "Elapsed time: 0.230073s"
```
That's about a 33-time difference in speed.
Also it's not like that (file-name-directory (directory-file-name <>)) is
supposed to resolve symbolic/hard links anyway.
--
Daanturo.
This bug report was last modified 2 years and 317 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.