9 ms·
Haskell is strongly and statically typed which means its compiler can generate more optimized code. The compiler also creates programs that run without a virtu
by skittles 12y ago
Haskell is strongly and statically typed which means its compiler can generate more optimized code. The compiler also creates programs that run without a virtual machine. Clojure is dynamically typed and runs on the JVM. It is still really fast compared to many other dynamic languages.
- rwosync 12y agoStatic typing is mostly orthogonal, Haskell is mostly blazing fast because of all the aggressive compiler optimizations and the last decade of hard work by Simon Marlow and others on the parallel runtime.
- tome 12y agoStatic types provide guarantees that help the compiler know when optimizations are valid.
- Ericson2314 12y agoThe second part is true, but that optimization would have been much harder, if not impossible, to implement had they had to rely on some sort of flow analysis instead of static typing.
- wereHamster 12y ago> The compiler also creates programs that run without a virtual machine. To be honest, the whole GHC runtime is sortof a VM. It manages thunks, evaluates them etc. It may not have the same overhead as JVM, but there definitely is some.
- jgalt212 12y agoso is Typed Clojure much faster than regular dynamic Clojure?