aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/benchmark.el6
-rw-r--r--lisp/startup.el16
2 files changed, 15 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el
index c5f621c6c86..882b1d68c48 100644
--- a/lisp/emacs-lisp/benchmark.el
+++ b/lisp/emacs-lisp/benchmark.el
@@ -121,7 +121,11 @@ result. The overhead of the `lambda's is accounted for."
121 (unless (or (natnump repetitions) (and repetitions (symbolp repetitions))) 121 (unless (or (natnump repetitions) (and repetitions (symbolp repetitions)))
122 (setq forms (cons repetitions forms) 122 (setq forms (cons repetitions forms)
123 repetitions 1)) 123 repetitions 1))
124 `(benchmark-call (byte-compile '(lambda () ,@forms)) ,repetitions)) 124 `(benchmark-call (,(if (native-comp-available-p)
125 'native-compile
126 'byte-compile)
127 '(lambda () ,@forms))
128 ,repetitions))
125 129
126;;;###autoload 130;;;###autoload
127(defun benchmark (repetitions form) 131(defun benchmark (repetitions form)
diff --git a/lisp/startup.el b/lisp/startup.el
index d90e7a7d26e..05d829396d6 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -525,12 +525,16 @@ DIRS are relative."
525 (files &optional recursively load selector)) 525 (files &optional recursively load selector))
526(defun startup--honor-delayed-native-compilations () 526(defun startup--honor-delayed-native-compilations ()
527 "Honor pending delayed deferred native compilations." 527 "Honor pending delayed deferred native compilations."
528 (when (and (native-comp-available-p) 528 (if (and (native-comp-available-p)
529 comp--delayed-sources) 529 comp--delayed-sources)
530 (require 'comp) 530 (progn
531 (setq comp--loadable t) 531 ;; Require comp before setting `comp--loadable' to break
532 (native--compile-async comp--delayed-sources nil 'late) 532 ;; circularity.
533 (setq comp--delayed-sources nil))) 533 (require 'comp)
534 (setq comp--loadable t)
535 (native--compile-async comp--delayed-sources nil 'late)
536 (setq comp--delayed-sources nil))
537 (setq comp--loadable t)))
534 538
535(defvar native-comp-eln-load-path) 539(defvar native-comp-eln-load-path)
536(defun normal-top-level () 540(defun normal-top-level ()