[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the
From: |
Stefan Monnier |
Subject: |
Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle |
Date: |
Mon, 17 Apr 2023 13:11:27 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> ELISP> (macroexpand '`(,@(list 1 2) a b c d))
>> (append (list 1 2) '(a b c d))
>> ELISP> (macroexpand '`(a b c d ,@(list 1 2)))
>> (cons 'a (cons 'b (cons 'c (cons 'd (list 1 2)))))
>> ELISP>
> Why is the former more efficient than the latter?
One allocates N₁+N₂ cons cells, then other only allocates N₁ cons-cells.
This is true regardless of how we macroexpand and byte-compile the code.
This only makes a diference for code that's executed several times
(i.e. not at toplevel).
Stefan
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, (continued)
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Lynn Winebarger, 2023/04/17
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Philip Kaludercic, 2023/04/17
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Mattias Engdegård, 2023/04/17
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Mattias Engdegård, 2023/04/17
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Stefan Monnier, 2023/04/17
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Mattias Engdegård, 2023/04/17
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Stefan Monnier, 2023/04/17
- Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle, Mattias Engdegård, 2023/04/18
Re: [elpa] externals/org 26ef5e3e5b: org-src: Use `sh-mode' for all the shells it can handle,
Stefan Monnier <=