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

Any experience with Julia and how it stacks up to CL for numerical computing?


It's a lot better for numerical work.

* Julia has multiple dispatch like in CLOS, except generic functions can devirtualize their arguments, and can be inlined, making the composition of many small function calls significantly faster.

* All functions (except a dozen or so internal builtins) are generic functions which can have methods added to them, and all objects can be dispatched on.

* Objects can be isbits and allocated inline in an array or stack allocated without any pointer indirection.

* Julia's type system is parametric, and things like Array is parameterized on it's contents, meaning that you can dispatch on thing like Array{Int} as a distinct type from Array{Quaternion{Float64}}.

There's lots of things Common Lisp does really well, but I really do think in the niche of numerical computing, Julia just blows it out of the water for performance and also ecosystem size / vibrancy.


I would say that Julia's great advantage is following Dylan's footsteps, being a Lisp without parenthesis, for those that can't get their head around them.

From the point of view of code generation, its JIT takes advantage of being built on top of LLVM's optimisations.




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

Search: