I am seeing more like 1.8 seconds for the raw version, vs. 2.8 seconds for 
slurp (master branch). Can you post a complete example (including the clj 
script you use, and what version of Clojure), so we can be apples-to-apples?

Stu

> 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

-- 
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