comparison lisp/emacs-lisp/benchmark.el @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents e4bf575fd91c
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
1 ;;; benchmark.el --- support for benchmarking code 1 ;;; benchmark.el --- support for benchmarking code
2 2
3 ;; Copyright (C) 2003 Free Software Foundation, Inc. 3 ;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5 ;; Author: Dave Love <fx@gnu.org> 5 ;; Author: Dave Love <fx@gnu.org>
6 ;; Keywords: lisp, extensions 6 ;; Keywords: lisp, extensions
7 7
8 ;; This file is free software; you can redistribute it and/or modify 8 ;; This file is free software; you can redistribute it and/or modify
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details. 16 ;; GNU General Public License for more details.
17 17
18 ;; You should have received a copy of the GNU General Public License 18 ;; You should have received a copy of the GNU General Public License
19 ;; along with GNU Emacs; see the file COPYING. If not, write to 19 ;; along with GNU Emacs; see the file COPYING. If not, write to
20 ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 ;; Boston, MA 02111-1307, USA. 21 ;; Boston, MA 02110-1301, USA.
22 22
23 ;;; Commentary: 23 ;;; Commentary:
24 24
25 ;; Utilities for timing the execution of forms, including the time 25 ;; Utilities for timing the execution of forms, including the time
26 ;; taken for GC. Note that prior to timing code you may want to 26 ;; taken for GC. Note that prior to timing code you may want to
112 (message "Elapsed time: %fs" (car result)) 112 (message "Elapsed time: %fs" (car result))
113 (message "Elapsed time: %fs (%fs in %d GCs)" (car result) 113 (message "Elapsed time: %fs (%fs in %d GCs)" (car result)
114 (nth 2 result) (nth 1 result))))) 114 (nth 2 result) (nth 1 result)))))
115 115
116 (provide 'benchmark) 116 (provide 'benchmark)
117
118 ;;; arch-tag: be570e24-4b51-4784-adf3-fa2b56c31946
117 ;;; benchmark.el ends here 119 ;;; benchmark.el ends here