Tell the compiler that READ-DELIMITED-LIST always returns a list.
Compiling the following function generates an efficiency note; with the patch the note disappears. (defun foo () (declare (optimize speed)) (let* ((stream (make-string-input-stream "0 1 2 3)")) (read (read-delimited-list #\) stream))) (find 2 read))) ; (find 2 read) ; Note: Unable to optimize due to type uncertainty: ; The second argument is a (or null vector cons), not a simple-base-string. Problem and fix from Tony Martinez via SBCL.
Please register or sign in to comment