Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't know anything about Jython or Scala, but I do know that Clojure does NOT have native Java speed.

Clojure objects are Java Objects, so they must be boxed & unboxed by the JVM.

Clojure is decently fast, but well-written Java will continue to smoke it for some time to come.



> Clojure objects are Java Objects, so they must be boxed & unboxed by the JVM.

I presume you meant Clojure numbers, because there is no notion of 'boxing' for reference types. For all non-numeric objects, the Clojure representation is the same as the Java representation. Type-hinted calls to methods of said objects generate the same bytecode as Java, with the same performance.

As far as numbers, recent enhancements ( http://clojure.org/java_interop#primitives ) allow Clojure to produce primitive arithmetic with the same speed as Java, but with a more-powerful, macro-amenable syntax.

While Clojure offers higher-order constructs with an attendant, but not prohibitive, cost, performance-oriented Clojure code can match the speed of Java.


Rich, you're seriously some kind of linguistic superhero. Or maybe like the Monty Python version of the Spanish Inquisition. Either way, it's impressive.

This:

    As far as numbers, recent enhancements allow Clojure to 
    produce primitive arithmetic with the same speed as Java, 
    but with a more-powerful, macro-amenable syntax."
Just blows me away.


Eh, it's too late to edit my other post, but the new design at Clojure.org looks great!


Speed is really the worst argument ever. For 99,99% of applications it really is not relevant, because they'll never have many simultaneous users.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: