Ah the memories. I attempted to integrate J-lang into Clojure at one point.
Imagine doing
(defn average [coll] (j +/ %#))
And have it run at the speed of C :)
(I failed because I didnt have the patience to sort out all the type-casting)
Imagine doing
(defn average [coll] (j +/ %#))
And have it run at the speed of C :)
(I failed because I didnt have the patience to sort out all the type-casting)
Unlikely; clojure runs on the jvm (or on top of js), and interop with c is slow.
That's a lot of conditions, but it's not completely crazy. :)
There's some support for vectorization in the JVM, e.g. [1, 2], but I suspect it's hit-or-miss.
[1] https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6340864
[2] https://bugs.java.com/bugdatabase/view_bug.do?bug_id=7192383