diff lisp/utils/bench.el @ 74:54cc21c15cbb r20-0b32

Import from CVS: tag r20-0b32
author cvs
date Mon, 13 Aug 2007 09:04:33 +0200
parents b9518feda344
children 1ce6082ce73f
line wrap: on
line diff
--- a/lisp/utils/bench.el	Mon Aug 13 09:03:47 2007 +0200
+++ b/lisp/utils/bench.el	Mon Aug 13 09:04:33 2007 +0200
@@ -71,6 +71,7 @@
     (bench-mark-10 . "Garbage Collection Large Size List")
     (bench-mark-11 . "Make Several Small Size List")
     (bench-mark-12 . "Garbage Collection Small Size List")
+    (bench-mark-13 . "Append to buffer")
 ))
 
 (defconst bench-enabled-profiling nil
@@ -188,6 +189,18 @@
   (garbage-collect)
 )
 
+;-----------------------------------------------------------------------------
+(defun bench-mark-13 ()
+  (unwind-protect
+      (let ((a 100000))
+        (set-buffer (get-buffer-create "*tmp*"))
+        (erase-buffer)
+        (while (> a 0)
+          (insert "0123456789\n")
+          (setq a (1- a))))
+    (kill-buffer "*tmp*")))
+
+
 ;=============================================================================
 (defun bench-init ()
   "Initialize profiling for bench marking package."