Merge commit '894d0b894daae001495c748b3352cd79918d3789'
[bpt/guile.git] / benchmark-suite / benchmarks / ports.bm
index 0b1d7f5..4177255 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ports.bm --- Port I/O.         -*- mode: scheme; coding: utf-8; -*-
 ;;;
-;;; Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+;;; Copyright (C) 2010-2014 Free Software Foundation, Inc.
 ;;;
 ;;; This program is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU Lesser General Public License
@@ -87,4 +87,9 @@
   (let ((str (string-concatenate (make-list 1000 "one line\n"))))
     (benchmark "read-line" 1000
                (let ((port (open-input-string str)))
-                 (sequence (read-line port) 1000)))))
+                 (sequence (read-line port) 1000))))
+
+  (let ((str (large-string "Hello, world.\n")))
+    (benchmark "read-string" 200
+               (let ((port (open-input-string str)))
+                 (read-string port)))))