Hacker News new | past | comments | ask | show | jobs | submit login

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.



> 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.


Static 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.


Static types provide guarantees that help the compiler know when optimizations are valid.


The 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.


so is Typed Clojure much faster than regular dynamic Clojure?




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

Search: