mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
* Have `benchmark-run-compiled' use the native compiler when available
* lisp/emacs-lisp/benchmark.el (benchmark-run-compiled): Use native compiler when available.
This commit is contained in:
parent
a8862f313b
commit
60cfb90d01
1 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue