Hello, In order to understand the agent model of Clojure better I wrote the alioth shootout threadring benchmark [1]. I ran some tests to compare it with the Java and Scala implementation [2, 3] which I picked from the published benchmarks.
The clojure code can be found here: http://gist.github.com/124688 The benchmark from my two core 1.7GHz pentium system (ubuntu 9.04) w/ 1GB RAM can be found here: http://spreadsheets.google.com/ccc?key=rQLD6jgTTV5OqXwHdXtrTyg In summary, scala implementation is 6.34x times slower than java, clojure is 7.8x. Avg CPU consumption is 93.3% for java and 179.2% and 131.34% for scala and clojure respectively. I thought of sharing this in case others are interested. As this is my first program using clojure agents I would appreciate any comments on improving the Clojure implementation (or in case there are any bugs). Thanks. Parth PS: For the Java implementation I happen to pick the "interesting alternate programs" (Java 6 -server #5) but it was already quite late in the cycle when I realized that. So the Java numbers are probably better than the other java implementations. [1] http://shootout.alioth.debian.org/u32q/benchmark.php?test=threadring&lang=all [2] http://shootout.alioth.debian.org/u32q/benchmark.php?test=threadring&lang=java&id=5 [3] http://shootout.alioth.debian.org/u32q/benchmark.php?test=threadring&lang=scala&id=1 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---