1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 17:30:54 -08:00

Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

This commit is contained in:
Eli Zaretskii 2022-01-27 12:57:16 +02:00
commit dae4fa9986
2 changed files with 15 additions and 7 deletions

View file

@ -121,7 +121,11 @@ result. The overhead of the `lambda's is accounted for."
(unless (or (natnump repetitions) (and repetitions (symbolp repetitions)))
(setq forms (cons repetitions forms)
repetitions 1))
`(benchmark-call (byte-compile '(lambda () ,@forms)) ,repetitions))
`(benchmark-call (,(if (native-comp-available-p)
'native-compile
'byte-compile)
'(lambda () ,@forms))
,repetitions))
;;;###autoload
(defun benchmark (repetitions form)

View file

@ -525,12 +525,16 @@ DIRS are relative."
(files &optional recursively load selector))
(defun startup--honor-delayed-native-compilations ()
"Honor pending delayed deferred native compilations."
(when (and (native-comp-available-p)
comp--delayed-sources)
(require 'comp)
(setq comp--loadable t)
(native--compile-async comp--delayed-sources nil 'late)
(setq comp--delayed-sources nil)))
(if (and (native-comp-available-p)
comp--delayed-sources)
(progn
;; Require comp before setting `comp--loadable' to break
;; circularity.
(require 'comp)
(setq comp--loadable t)
(native--compile-async comp--delayed-sources nil 'late)
(setq comp--delayed-sources nil))
(setq comp--loadable t)))
(defvar native-comp-eln-load-path)
(defun normal-top-level ()