Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for small lists (under 250 items), which is exactly how I've been using them. The only caveat is alist-get's signature is different on Emacs 25, thus a polyfill is necessary in core-lib.
This commit is contained in:
parent
f602a1f607
commit
f6dc6ac74e
29 changed files with 177 additions and 146 deletions
|
@ -222,8 +222,8 @@ elsewhere."
|
|||
doom-private-dir)
|
||||
(setq plist (plist-put plist :private t)))
|
||||
`(progn
|
||||
,(if pkg-pin `(map-put package-pinned-packages ',name ,pkg-pin))
|
||||
(map-put doom-packages ',name ',plist)
|
||||
,(if pkg-pin `(setf (alist-get ',name package-pinned-packages) ,pkg-pin))
|
||||
(setf (alist-get ',name doom-packages) ',plist)
|
||||
(not (memq ',name doom-disabled-packages)))))
|
||||
|
||||
(defmacro packages! (&rest packages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue