I updated my Clojure shootout web site benchmark programs so they worked on 1.3 alpha1, and ran them on 4 JVMs on 3 different OSs. The timing results are collected on the following ugly but quick-to-create- from-an-Excel-spreadsheet web page:

http://homepage.mac.com/jafingerhut/files/clojure-benchmarks/results-java-clj-1.2-1.3a1.html

That page also collects together timing results for the Java versions of the benchmark programs, and Clojure 1.2 run times. The Clojure programs are identical source code for 1.2 and 1.3 alpha1, but some have little macros like this so that the programs can be the same for both:

;; Handle slight difference in function name between Clojure 1.2.0 and
;; 1.3.0-alpha1.
(defmacro my-unchecked-dec-int [& args]
  (if (and (== (*clojure-version* :major) 1)
           (== (*clojure-version* :minor) 2))
    `(unchecked-dec ~...@args)
    `(unchecked-dec-int ~...@args)))

I have not gone to any lengths to tweak the utmost performance out of these programs based on new features in 1.3 alpha1 -- I only made the changes needed to get them to compile without reflection warnings and run. (Detail: OK, there are a very few reflection warnings remaining, but they are in initialization code that has little effect on the total run time -- there are none in the inner loops where most of the run time is spent.)

The far right columns compare the Clojure 1.2 and 1.3 alpha1 run times. 1.3 alpha1 is faster for some (negative percentages mean a reduction in run time from 1.2 to 1.3 alpha1), slower for others (positive percentages).

All times are in seconds. Elapsed means wall clock time from start to finish, "user" is the total CPU time taken in user space, and "sys" is the system or kernel run time taken. (user+sys) can be more than elapsed if both of the 2 cores on my system were used in parallel for that particular program.

The files and scripts used to create it are here on github:
http://github.com/jafingerhut/clojure-benchmarks

If you have git and want your own local copy to play with:

git clone git://github.com/jafingerhut/clojure-benchmarks.git

Unfortunately, the process of taking the timing results and putting them into the table are not automated, but just about everything before that is.

As usual, any improvements to these programs are welcome.

Andy

--
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

Reply via email to