by edifice · 16y ago · 0 comments
The article also doesn't get into deftype/defrecord/protocols. In those cases you always get the fastest path of the platform. Again you can build things that have the same perf of the core data structures w/o resorting to ^:static or type decls.
So what exactly do you mean again by arbitrary code? Perhaps you meant numeric code - there ^:static and type decls help plenty. Perhaps you mean Java interop? Again sure.
Personally I think Clojure is really taking the dynamic, generic, and fast thing to a whole new level, w/o type-hinting of any kind.
EDIT: This isn't too say Clojure performance can't continue to improve. Scala's ability to use Java arrays of primitives in higher order operations is something I really, really want to see (and the the above is a big chunk of the work in that direction)
Clojure is awesome because it provides immutable persistent structures that are well onto the good side of "good enough", not because it's the fastest thing possible. Java itself is far from the fastest thing possible, and the speed of Java is itself a strict upper bound on Clojure's speed.
I think clojure is getting really close to a dynamic language that can get down to the speed of a static language if you need it.