What can Rust do for astrophysics?
arxiv.org
What can Rust do for astrophysics?
1–10 of 115 posts
Re: What can Rust do for astrophysics?
#2Where is the discussion of the library availability? The libraries for Fortran are maintained and improved during the decades?
Re: What can Rust do for astrophysics?
#3In table 1
Rust Fortran C Go
0m13.660s 0m14.640s 2m32.910s 4m26.240sThey did have a note that C could be faster if language specific features could be used.
Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?
Re: What can Rust do for astrophysics?
#4It's crazy for me to see that C is much slower than rust. I'm almost sure that there's something wrong there. In table 1 Rust Fortran C Go 0m13.660s 0m14.640s 2m32.910s 4m26.240s They did have a note that C could be faster if language specific features could be used. Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?
Which would be the equivalent of writing a comparison between a sledgehammer and jackhammer, without turning the latter on.
Re: What can Rust do for astrophysics?
#5It's crazy for me to see that C is much slower than rust. I'm almost sure that there's something wrong there. In table 1 Rust Fortran C Go 0m13.660s 0m14.640s 2m32.910s 4m26.240s They did have a note that C could be faster if language specific features could be used. Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?
Re: What can Rust do for astrophysics?
#6It's crazy for me to see that C is much slower than rust. I'm almost sure that there's something wrong there. In table 1 Rust Fortran C Go 0m13.660s 0m14.640s 2m32.910s 4m26.240s They did have a note that C could be faster if language specific features could be used. Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?
Rust is able to avoid allocations and de-allocations in many areas where C programmers would manually use alloc and free. I must admit though, that's less relevant to scientific programming, where the heaviest work is mainly matrix matrix multiplication and the sizes of everything is known in advance.
Without reading through the paper, I expect work on the Rust/Fortran side is being vectorized and/or being kept in L1/L2 caches, whereas the C and Go compilers don't use SIMD instructions and/or are generating code that triggers cache misses.
Re: What can Rust do for astrophysics?
#7Where are the links to the sources and is there a chance to compare the versions (Fortran vs Rust doing the same calculations)? I wasn't able to find them. Where is the discussion of the library availability? The libraries for Fortran are maintained and improved during the decades?
https://github.com/marblestation/benchmark-leapfrog
And indeed, Fortran has decades of advantage in terms of libraries.
Re: What can Rust do for astrophysics?
#8It's crazy for me to see that C is much slower than rust. I'm almost sure that there's something wrong there. In table 1 Rust Fortran C Go 0m13.660s 0m14.640s 2m32.910s 4m26.240s They did have a note that C could be faster if language specific features could be used. Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?
There's something wrong there. Either a corner case, or they are multithreading and vectorizing the Rust/Fortran but not the C. Which would be the equivalent of writing a comparison between a sledgehammer and jackhammer, without turning the latter on.
https://github.com/marblestation/benchmark-leapfrog
It would be great if somebody have a fresh look at the C version, since I completely agree that it is not normal that its execution time is so far away from Fortran or Rust.
Re: What can Rust do for astrophysics?
#9It's crazy for me to see that C is much slower than rust. I'm almost sure that there's something wrong there. In table 1 Rust Fortran C Go 0m13.660s 0m14.640s 2m32.910s 4m26.240s They did have a note that C could be faster if language specific features could be used. Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan... -- in this benchmarks C in most cases faster than Rust, but only in few they have the same performance.
Re: What can Rust do for astrophysics?
#10It's crazy for me to see that C is much slower than rust. I'm almost sure that there's something wrong there. In table 1 Rust Fortran C Go 0m13.660s 0m14.640s 2m32.910s 4m26.240s They did have a note that C could be faster if language specific features could be used. Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?