For the record, this program runs in 3.3 seconds so I guess that
points to the implementation of slurp:

(import '[java.io BufferedReader InputStreamReader])

(let [reader (BufferedReader. (InputStreamReader. System/in))
      file-data (StringBuffer.)
      buffer (char-array 4096)]
  (loop [total 0]
    (let [num-read (.read reader buffer)]
      (if (not= -1 num-read)
        (do
          (.append file-data buffer 0 num-read)
          (recur (+ total num-read)))
        (println total)))))

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to