[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/byte-switch 309b464: * lisp/emacs-lisp/byte-opt.el
From: |
Vibhav Pant |
Subject: |
[Emacs-diffs] feature/byte-switch 309b464: * lisp/emacs-lisp/byte-opt.el: Optimize how tags are checked for use. |
Date: |
Sun, 15 Jan 2017 16:11:39 +0000 (UTC) |
branch: feature/byte-switch
commit 309b46420e83826ed1e0b947f98a47e8525e3c36
Author: Vibhav Pant <address@hidden>
Commit: Vibhav Pant <address@hidden>
* lisp/emacs-lisp/byte-opt.el: Optimize how tags are checked for use.
* byte-opt.el: (byte-optimize-lapcode): Return nil instantly on
finding the tag in a jump table.
---
lisp/emacs-lisp/byte-opt.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 9412ce3..c774d26 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1730,10 +1730,9 @@ If FOR-EFFECT is non-nil, the return value is assumed to
be of no importance."
;;
((and (eq 'TAG (car lap0))
(not (rassq lap0 lap))
- (= (length (cl-loop for table in byte-compile-jump-tables
- when (member lap0 (hash-table-values
table))
- collect t))
- 0))
+ (cl-loop for table in byte-compile-jump-tables
+ when (member lap0 (hash-table-values table))
+ return nil finally return t))
(and (memq byte-optimize-log '(t byte))
(byte-compile-log " unused tag %d removed" (nth 1 lap0)))
(setq lap (delq lap0 lap)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] feature/byte-switch 309b464: * lisp/emacs-lisp/byte-opt.el: Optimize how tags are checked for use.,
Vibhav Pant <=