Generate fewer useless conditionals in cl-loop
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause): Don't generate a condition if both branches are the same, which is the common case.
This commit is contained in:
parent
fb38d367f4
commit
8e3868125c
1 changed files with 4 additions and 1 deletions
|
@ -1318,7 +1318,10 @@ For more details, see Info node `(cl)Loop Facility'.
|
|||
(nreverse cl--loop-conditions)))
|
||||
,then ,var))
|
||||
loop-for-steps))
|
||||
(push `(,var (if ,first-assign ,start ,then)) loop-for-sets))))
|
||||
(push (if (eq start then)
|
||||
`(,var ,then)
|
||||
`(,var (if ,first-assign ,start ,then)))
|
||||
loop-for-sets))))
|
||||
|
||||
((memq word '(across across-ref))
|
||||
(let ((temp-vec (make-symbol "--cl-vec--"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue