New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust isn't actually doing any work? #6
Comments
Update: final output is 134 seconds, and also the output is |
I modified all the tests to randomize the values of X, V, A and M and then at the end of the code printed out the first value of each. I get the following times: Go: 288.13s Obviously this was a very quick modification and I am now adding some noise because the timing includes the initialization of the arrays rather than a memset. To do this properly I would want the code to read in its initial data from the disk, calculate the time it takes to do the integration steps and then write out the results to a file. |
PR fixing this: #8 |
Now all the codes print the final positions: 8b89e8d, 33c6945 On my machine: C: 2m24.406s There is still NaN since everything is initialised to zero and there is a division by zero. That's something to improve, not sure how it affects the execution time comparison. |
I'm not an expert on rust, but I added to the end:
println!("{:?}",x);
(to check the answer), to the end ofmain
and now the runtime on my machine has gone from 11 seconds to more than 2 minutes. Still running.The text was updated successfully, but these errors were encountered: