File: byte-opt.el.html
========================================================================
"No matter how hard you try, you can't make a racehorse out of a pig.
You can, however, make a faster pig."
Or, to put it another way, the Emacs byte compiler is a VW Bug. This code makes it be a VW Bug with fuel injection and a turbocharger... You're still not going to make it go faster than 70 mph, but it might be easier to get it there.
TO DO:
;; An awful lot of functions always return a non-nil value. If they're
;; error free also they may act as true-constants.
(disassemble (lambda (x) (and (point) (foo))))
;; When
;; - all but one arguments to a function are constant
;; - the non-constant argument is an if-expression (cond-expression?)
;; then the outer function can be distributed. If the guarding
;; condition is side-effect-free [assignment-free] then the other
;; arguments may be any expressions. Since, however, the code size
;; can increase this way they should be "simple". Compare:
(disassemble (lambda (x) (eq (if (point) 'a 'b) 'c)))
(disassemble (lambda (x) (if (point) (eq 'a 'c) (eq 'b 'c))))
;; (car (cons A B)) -> (prog1 A B)
(disassemble (lambda (x) (car (cons (foo) 42))))
;; (cdr (cons A B)) -> (progn A B)
(disassemble (lambda (x) (cdr (cons 42 (foo)))))
;; (car (list A B ...)) -> (prog1 A B ...)
(disassemble (lambda (x) (car (list (foo) 42 (bar)))))
;; (cdr (list A B ...)) -> (progn A (list B ...))
(disassemble (lambda (x) (cdr (list 42 (foo) (bar)))))
Defined variables (5)
byte-optimize--aliased-vars | List of variables which may be aliased by other lexical variables. |
byte-optimize--dynamic-vars | List of variables declared as dynamic during optimization. |
byte-optimize--inhibit-outside-loop-constprop | If t, don’t propagate values for variables declared outside the inner loop. |
byte-optimize--lexvars | Lexical variables in scope, in reverse order of declaration. |
byte-optimize--vars-outside-loop | Alist of variables lexically bound outside the innermost ‘while’ loop. |