Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I originally tried to run the Julia benchmark, but the
using LinearAlgebra: normwas missing. Then I sort of "julianized" a little bit further the code. What I did is:main(). That way the code is generic and, in principle, dynamic (one can run another simulation with different properties). The code is more flexible in the sense that you don't need to set the dimension and type of points toconstanywhere (because these are parameters ofmain()input variables now).@inboundsflags and added--check-bounds=noas a flag to theoptimizedrun. (I don't think you have to discount compile time here, it is not relevant for the running time of your test).Performance-wise there is not significant different relative to the original code, although in Julia 1.6.3 here I get
2 min 10sfor therustimplementation vs.2 min 24sfor the Julia one (thus not the big difference reported in the main readme).Anyway, I was just playing with it, nice repository (do whatever you want with the pull request). If you are interest, I discuss some interesting properties of a Julia particle simulation code here: https://m3g.github.io/2021_FortranCon/