I looked briefly at the code and can confirm that to my eye, the two implementations appear to be implementing the same algorithm.
My first guess would be that the performance difference comes from Clojure's use of boxed numbers for all the positions. Possibly you could get better performance by using something like (defrecord Posn [^int x ^int y]) rather than vectors for the positions. It's tricky though, in Clojure, to make sure that the numbers remain primitives everywhere they are used. This hypothesis doesn't fit, however, with your observation that most of the time is spent in conjing things into sets. I can't explain why that would be a bottleneck. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.