Hi Christopher,

I ran your code with only one modification, using the "time" macro to 
measure the execution time of the mapper function itself:

(use ['clojure.java.io :only '(reader)])
(use ['clojure.string :only '(split)])

(defn mapper [lines]
  (doseq [line lines]
    (doseq [word (split line #"\s+")]
      (println (str word "\t1")))))

(time (mapper (line-seq (reader *in*))))

Processing a file that contained 1 copy of the "Hound of Baskerville" text 
took 1.9 seconds.
Processing a file that contained 2 copies of the text took 2.8 seconds.
Processing a file that contained 4 copies of the text took 3.8 seconds.

I did not use cake, but ran mapper.clj via a direct call to the java 
executable.  So I think the times you're seeing is due to either Cake or the 
way the timing is done.

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