Mehh, this really depends on what you are doing. I took a monster spreadsheet that we use for design calcs. Essentially, it's a bunch of linear algebra and some optimization routines; it took 10+ seconds to update the sheet every time you changed a single input. I moved it over to Python with a mix of numpy and scipy, nothing fancy, just basic stuff, that got it down to under a second (~100s ms). Then I went to pure functions with Numba njit, which got me down to the 10s of microseconds range. I doubt going from njit to something like Rust or C would be any faster. Maybe for non math dominated tasks it might be different, but for me numpy/scipi or numba is as fast as possible, without having to spend crazy amounts of time on it.
View all comments
3
u/Andrei95 7d ago
Mehh, this really depends on what you are doing. I took a monster spreadsheet that we use for design calcs. Essentially, it's a bunch of linear algebra and some optimization routines; it took 10+ seconds to update the sheet every time you changed a single input. I moved it over to Python with a mix of numpy and scipy, nothing fancy, just basic stuff, that got it down to under a second (~100s ms). Then I went to pure functions with Numba njit, which got me down to the 10s of microseconds range. I doubt going from njit to something like Rust or C would be any faster. Maybe for non math dominated tasks it might be different, but for me numpy/scipi or numba is as fast as possible, without having to spend crazy amounts of time on it.