Using the latest 1.3.0-master-SNAPSHOT: user=> (time (let [a (int 3) b (int 5)] (dotimes [_ 1000000] (== a b)))) "Elapsed time: 3.355 msecs" nil user=> (time (let [a (int 3) b (int 5)] (dotimes [_ 1000000] (= a b)))) "Elapsed time: 3.884 msecs" nil
Yay! On Mon, Oct 18, 2010 at 2:40 PM, Jürgen Hötzel <juer...@hoetzel.info> wrote: > 2010/10/18 Dmitriy S. <samborsk...@yahoo.com>: >> On Oct 18, 5:46 pm, Jürgen Hötzel <juer...@hoetzel.info> wrote: >>> Note the difference between "=" and "==", "=" will result in a cast to >>> the wrapped types for it's arguments. >> >> It seems that '=' is always slower than '==', >> even if types are primitive, look: >> >> Clojure 1.2.0 >> user=> (time (let [a (int 3) b (int 5)] (dotimes [_ 1000000] (= a >> b)))) >> "Elapsed time: 38.438735 msecs" >> nil >> user=> (time (let [a (int 3) b (int 5)] (dotimes [_ 1000000] (== a >> b)))) >> "Elapsed time: 4.79083 msecs" >> nil >> user=> > > Rich just added primitve = support: > > http://github.com/clojure/clojure/commit/df8c65a286e90e93972bb69392bc106128427dde > > Jürgen -- 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