Mark Engelberg <mark.engelb...@gmail.com> writes: > On Tue, Jun 30, 2009 at 12:29 AM, Konrad > Hinsen<konrad.hin...@laposte.net> wrote: >> What is particularly nice about Clojure is that in most situations >> you don't need to switch to Java for speed. You can optimize your >> code by adding type hints and switching to low-level data structures >> (unboxed ints and floats, arrays, ...) and get performance equal to >> Java. > > I have heard this claim about Clojure's speed a number of times, and I > am curious what the evidence for this claim is. As far as I know, no > one has written a suite of meaningful benchmarks to compare the > performance of Clojure versus Java. > > On the other hand, every month or so, someone posts here saying they > tried to do a single benchmark, and it runs quite a bit slower than > Java. People help out, and usually some ways to improve the code are > found, but I don't think I've ever seen the code actually get to the > point where it has "performance equal to Java". >
I think a problem with a lot of these micro-benchmarks is someone will find a small function in java and then try to write a clojure function that does the same thing the same way. I think a lot of the times you don't really see the speed increase until you take into account that you will do things differently in the larger picture with clojure than you would with java. When you take into account that clojure offers up algorithms that would be downright unwieldy to attempt in java do you really see the speeds even out. Daniel E. Renfer --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---