From ba7ca928e3a3bee761f717daaed689dab977c61c Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Fri, 15 Jul 2005 18:03:26 +0000 Subject: [PATCH] * performance patch: declare buffer types in fd-stream internals for massive speed benefit. Over 3 times speedup on looped read-line. --- src/code/fd-stream.lisp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 1c96917..0ce1b1f 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -1013,6 +1013,7 @@ &aux (total-copied 0)) (declare (type fd-stream stream)) (declare (type index start requested total-copied)) + (declare (type (simple-array character (#.+ansi-stream-in-buffer-length+)) buffer)) (let ((unread (fd-stream-unread stream))) (when unread (setf (aref buffer start) unread) @@ -1119,6 +1120,7 @@ &aux (total-copied 0)) (declare (type fd-stream stream)) (declare (type index start requested total-copied)) + (declare (type (simple-array character (#.+ansi-stream-in-buffer-length+)) buffer)) (let ((unread (fd-stream-unread stream))) (when unread (setf (aref buffer start) unread) -- 1.7.10.4