aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/benchmark.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el
index 25eddf5f6b0..a2217d20953 100644
--- a/lisp/emacs-lisp/benchmark.el
+++ b/lisp/emacs-lisp/benchmark.el
@@ -1,4 +1,4 @@
1;;; benchmark.el --- support for benchmarking code 1;;; benchmark.el --- support for benchmarking code -*- lexical-binding: t -*-
2 2
3;; Copyright (C) 2003-2017 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
4 4
@@ -33,6 +33,7 @@
33 33
34(defmacro benchmark-elapse (&rest forms) 34(defmacro benchmark-elapse (&rest forms)
35 "Return the time in seconds elapsed for execution of FORMS." 35 "Return the time in seconds elapsed for execution of FORMS."
36 (declare (indent 0) (debug t))
36 (let ((t1 (make-symbol "t1")) 37 (let ((t1 (make-symbol "t1"))
37 (t2 (make-symbol "t2"))) 38 (t2 (make-symbol "t2")))
38 `(let (,t1 ,t2) 39 `(let (,t1 ,t2)
@@ -41,9 +42,6 @@
41 (setq ,t2 (current-time)) 42 (setq ,t2 (current-time))
42 (float-time (time-subtract ,t2 ,t1))))) 43 (float-time (time-subtract ,t2 ,t1)))))
43 44
44(put 'benchmark-elapse 'edebug-form-spec t)
45(put 'benchmark-elapse 'lisp-indent-function 0)
46
47;;;###autoload 45;;;###autoload
48(defmacro benchmark-run (&optional repetitions &rest forms) 46(defmacro benchmark-run (&optional repetitions &rest forms)
49 "Time execution of FORMS. 47 "Time execution of FORMS.