On Jul 8, 4:17 pm, Ken Wesson <kwess...@gmail.com> wrote: > On Fri, Jul 8, 2011 at 7:05 PM, Christopher <vth...@gmail.com> wrote: > > ;; mapper.clj > > > (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"))))) > > > (mapper (line-seq (reader *in*))) > > Try (set! *warn-on-reflection* true) at your REPL and then evaluating > the above. One of the commonest causes of slow Clojure performance is > reflection, which can generally be avoided with judicious application > of type hints. >
There's no interop here, so I 100% guarantee he doesn't have any reflection warnings. -- 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