I'm asking here because I don't know a bit of Lisp so I can't just quickly code a benchmark. Thanks!!
I'm asking here because I don't know a bit of Lisp so I can't just quickly code a benchmark. Thanks!!
Generally speaking, I found the following to be true:
Java < Scala < Clojure < ... < JRuby.
Clojure is relatively fast. It really depends on the program at hand, but in my experience, having to REALLY generalize, it's at least an order of magnitude faster than Ruby/JRuby.
However, if you push it, Clojure can be as fast as anything else on the JVM; it's just a matter of how much time you spend profiling and optimizing. In many cases you can output the exact same bytecode in Clojure that you'd get from a several-times-more-verbose Java program.
An extreme example: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html
Clojure 1.0.0-
user=> Hello, world!
nil
user=>
real 0m2.756s
user 0m1.040s
sys 0m0.140s
$ time echo 'print "Hello, world!"' | python
Hello, world!
real 0m0.018s
user 0m0.000s
sys 0m0.010s
Beware the horrible startup time for small programs.