2 ms·
I'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
by gpm 7y ago
I'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).