thinking of http://w01fe.com/blog/2009/01/pleasant-surprise-clojures-apply-is-lazy/ ?
On Wed, May 20, 2009 at 3:38 PM, CuppoJava <patrickli_2...@hotmail.com>wrote: > > Hi, > I'm using "apply" a lot in my code, and a small micro-benchmark is > telling me that it's a very slow operation. Can someone confirm this? > I'm wondering whether my benchmark is incorrect, or whether there's a > hidden reflection that I'm not seeing. > > Thanks a lot for the help > -Patrick > > (let [i [1]] > (time (dotimes [j 10000000] > (apply #(Math/ceil %) i)))) > > Elapsed Time: 4123.448 msecs > > (let [i 1] > (time (dotimes [j 10000000] > (Math/ceil i)))) > > Elapsed Time: 555.107 msecs > > > -- ~phunny.pha...@gmail.com ~mar...@archlinux.us --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---