Possibly of interest here, although I've only tested it using Clojure 1.1: I just did an implementation of the n-body problem from http://shootout.alioth.debian.org/u32q/benchmark.php?test=nbody&lang=all
The fastest code I've managed so far is here: http://github.com/j-g-faustus/Clojure-test-code/blob/master/shootout/nbody.clj On my machine this is about 4x slower than the shootout Java implementation. Using Java as the baseline and comparing my local results to the shootout timings, it puts Clojure 1.1 on par with Erlang, Go and OCaml. On profiling I have a bunch of intCast(Object) and doubleCast(double) totaling ~9% CPU time (no screenshot yet, sorry), I'll see if I can eliminate them for a few percent improvement. A bit more here: http://stackoverflow.com/questions/3124344/clojure-number-crunching-performance where I am also asking * are there any obvious improvements to my code? * do you consider 4x slower than Java and 10x quicker than Python/Ruby representative for Clojure performance? For the record, I think an order of magnitude quicker than Perl/Python/ Ruby is a quite decent result. ~4x slower than C, Java and Scala is a performance hit I can live with in return for a more comfortable language. If 1.2 gives even better performance, or similar performance with less effort, so much the better. Regards jf PS: If there are no obvious improvements, I'd like to submit this n- body implementation to the shootout. Any objections? (Like "wait for 1.2"?) On Jun 24, 11:08 pm, "Heinz N. Gies" <he...@licenser.net> wrote: > The benchmark I did was the fannkuchen-redux benchmark the code I came up > with was the following: > > http://github.com/Licenser/clj-shootout/blob/master/fannkuchen/src/pr... > > the scala version I used is from the alioth shootout: > > http://github.com/Licenser/clj-shootout/blob/master/fannkuchen/scala/... -- 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