title: Common Lisp: The fastest way to read the stream
body: <p>folks, what is the fastest approach for reading the stream in Common Lisp (SBCL) ?</p>
  
  <p>For me, that is <strong>read-line</strong>. But suddenly I've stuck with the performance problem with this function - I should read 10kk characters (1000 lines with 10000 chars at each) in 1.5 sec, but read-line failed to achieve it. Is it possible with Common Lisp? Does it provide a C-style <strong>scanf()</strong> function for fast reading?</p>
  
  <p>Thanks!</p>
  
  <p><strong>UPDATE</strong>. The code:</p>
  
  <pre><code>(defun split (string)
    (let ((space-position (position #\Space string)))
      (list 
       (subseq string 0 space-position) 
       (subseq string (+ space-position 1)))))
  
  (defun solve (line)
    (let ((nums (split line))
      (first)
      (second))
      (setq first (parse-integer (car nums)))
      (setq second (parse-integer (cadr nums)))
  
      (* first second)))
  
  (defun spoj()
    (let ((N (read))
          (line))
      (dotimes (i N)
        (setq line (read-line))
        (format t "~d~%" (solve line))))))
  
  (spoj)
  </code></pre>