diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-01-27 12:57:16 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-01-27 12:57:16 +0200 |
commit | dae4fa998609af286ba7a8a2e2a2e77d22df1faa (patch) | |
tree | 3e4062795d56032f334407846cf20e09a2ed7391 /lisp/emacs-lisp | |
parent | 9d34946e53afb928c1885df8fcb48d2618853708 (diff) | |
parent | d0aac84b2a8d82042475aeeeba465d0d5fd6ad3d (diff) | |
download | emacs-dae4fa998609af286ba7a8a2e2a2e77d22df1faa.tar.gz emacs-dae4fa998609af286ba7a8a2e2a2e77d22df1faa.tar.bz2 emacs-dae4fa998609af286ba7a8a2e2a2e77d22df1faa.zip |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/benchmark.el | 6 |
1 files changed, 5 insertions, 1 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." (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) |