2 ms·
> Anecdote: I'm starting to learn Rust, and just for fun, wrote a dumb single-loop Riemann sum to compute pi in Rust and Fortran (as the area of the circle) - a
by electricslpnsld 8y ago
> Anecdote: I'm starting to learn Rust, and just for fun, wrote a dumb single-loop Riemann sum to compute pi in Rust and Fortran (as the area of the circle) - and Fortran code ran 2x faster. When the computation time is measured in days, this kind of difference matters.
I'd love to use Rust for numerical heavy code, like Fortran Rust is no-aliasing out of the box which is great for code gen, but Rust also has many of the niceties of C++. Still no integer generics in Rust though. :(
- romwell 8y agoWell, the standard is still developing. I have high hopes for when more numeric computing people jump on the bandwagon.
- steveklabnik 8y agoThey should be in nightly later in the year, and stable early next year. We were only recently able to turn those no aliasing optimizations back on, so you were probably using a version of Rust that wasn’t even making use of them.