3 ms·
Python is kind of the gold standard in many areas of research, no? Why would you use Rust, or even anything but Python? I'd only touch Rust (or C/C++) when I n
by H8crilA 7y ago
Python is kind of the gold standard in many areas of research, no? Why would you use Rust, or even anything but Python?
I'd only touch Rust (or C/C++) when I need to implement some fast numerical computation that does not already exist in Numpy or Tensorflow, but still call it from Python.
- whatshisface 7y agoPeople who mostly do that weird numeric stuff find themselves wishing they could be free from that python interop, for example when 99% of your code is unique rust and at the end all you want is a graph. Another use case is when you want to write an application like ImageJ, to be used by (not necessarily computer-y) scientists other than yourself, where you want fast startup times and all-around good performance. Being able to do away with the python interop won't shatter the Earth but it would be nice. Besides, I love Python, everybody loves Python, but it's not the final end state of programming language evolution (isn't Haskell? ;).
- gpm 7y agoI've sped up a simulation 100 fold by porting a 20 line function to rust (which had a terrible access pattern for numpy), and could probably sped it up another 10 (which was closer to reasonable for numpy). If the thing could have been written in rust in the first place, tons of time would have been saved on trying to optimize python, waiting for simulations to complete before (and to a lesser extent after) I ported a portion of it to rust. Dealing with language interop and build systems. The main reason I can't suggest that for future similar problems to the person who I did this for is because of the lack of libraries like plotting (plotting is by far the most important one, numpy is second but rust comes a lot closer in that regard).