You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nice paper! FYI: I was experimenting with the elements example. I noticed that it is a good bit faster if you convert fromrv3 from a function to a subroutine. So:
puresubroutinefromrv3(r, v, mu, ele)
double precision, dimension(:), intent(in) :: r
double precision, dimension(:), intent(in) :: v
double precision, intent(in) :: mu
double precision, dimension(6),intent(out) :: ele
...
endsubroutine fromrv3
On my PC with ifort 17.0.2.187 (-O3 flag), for times=1000000, the total/times result goes from about 2.65e-7 to about 1.73e-7.
The text was updated successfully, but these errors were encountered:
The function version is probably slower since it allocates an additional array on the stack (see here). Do you agree?
Since all other implementations also explicitly return the result and not mutate a parameter like the subroutine version, I prefer to keep the function version.
Nice paper! FYI: I was experimenting with the
elements
example. I noticed that it is a good bit faster if you convertfromrv3
from a function to a subroutine. So:On my PC with ifort 17.0.2.187 (-O3 flag), for
times=1000000
, thetotal/times
result goes from about2.65e-7
to about1.73e-7
.The text was updated successfully, but these errors were encountered: