Comparison of Rust to Julia for scientific computing?

I think I should recap what was discussed (as I understand it):

  1. The cost of bounds checking can be avoided in Rust by compile-time “proofs” of correctness, which are somehow done in the type system. There is also get_unchecked, which is unsafe. So I think the conclusion is that it is possible to achieve high performance in Rust.
  2. Rust does not have much in the way of interactivity. It wasn’t stated but it sounds like this would be hard to add due to the nature of static typing. However, its incremental compilation is fast so in many use cases this isn’t such a big deal.
  3. The array indexing syntax is not as nice as Julia.
  4. The package ecosystem is not as developed (no DifferentialEquations.jl, Flux.jl, etc.). Autodiff wasn’t discuss but I suspect it’s not as developed in Rust as in Julia.
  5. It’s possible to use Rust from Julia and vice-versa. I suspect this won’t work for passing in custom types, e.g. autodiff.
  6. The safety of Rust might hav benefits for a large scale scientific computing project, as it avoids bugs.
21 Likes