4 ms·
That doesn't make sense to me. You might not save much time when going from C++ to Rust, but what about C++ to Ruby or Python? There are things I can do with a
by 6thaccount2 7y ago
That doesn't make sense to me. You might not save much time when going from C++ to Rust, but what about C++ to Ruby or Python?
There are things I can do with a few lines of code in Python that when I looked at how to do in lower level languages I just decided I could live with slower performance.
- jbay808 7y agoI do 95% of my dev work in Python so I'm quite biased in its favour. But I've seen literally 1000x speedups from transferring the numerical heavy lifting to C++, which paid back the time it took to rewrite that code in very short order and enabled us to do something that wasn't previously close to practical. I was pretty sure that the benefit would be closer 10x, but nope!
- sametmax 7y ago1000x faster than numpy / scipy ?
- 6thaccount2 7y agoYea...were you using Numpy or just trying to do someyin base Python?
- jbay808 7y agoI use numpy/scipy for everything I do by default, but not all operations can leverage it unfortunately. So what I mean is that the python program leveraged numpy to the greatest possible extent (that I know how), but was nonetheless 1000x slower than the C++ program that produced the same output. I am not making any claim that particular operations like summing up an array or doing an FFT is 1000x faster in C++ than in numpy. Of course it's not. In this case, numpy calls were certainly not the bottleneck, so it would be wrong to say "1000x faster than numpy". But it was, on the whole, 1000x faster than Python leveraging numpy.