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
Support for measuring timings, having timer ranges and pretty printing of time printout would be a useful addition. This is especially helpful for comparing implementation without relying on external tools.
Some time ago I prototyped some fypp macros for benchmarking. Not sure if they really offer any advantage vs subroutines/functions, but I think I was trying to emulate what Julia has. If I recall correctly Julia timer macros will adjust the number of calls automatically to obtain a decent sample, and then calculate some basic statistics (mean, variance).
A few more links to other timer packages can be found here: fortran-lang/benchmarks#6
The most complete one I've seen is the NIST StopWatch package but it would need a modern update.
On the other hand something more minimalistic could also be useful.
https://github.com/urbanjost/M_stopwatch is a version of StopWatch as an fpm package as well; albeit I use vendor utilities or gprof(1) myself for optimizing, sometimes I want an embedded timer. I found the dynamic loader module particularly interesting at the previously mentioned site; those are nicely done and look like they would be nice additions to the fpm(1) registry. At a minimum those should be added to the Fortran Wiki site.
Activity
ivan-pi commentedon Dec 20, 2021
Some time ago I prototyped some fypp macros for benchmarking. Not sure if they really offer any advantage vs subroutines/functions, but I think I was trying to emulate what Julia has. If I recall correctly Julia timer macros will adjust the number of calls automatically to obtain a decent sample, and then calculate some basic statistics (mean, variance).
A few more links to other timer packages can be found here: fortran-lang/benchmarks#6
The most complete one I've seen is the NIST StopWatch package but it would need a modern update.
On the other hand something more minimalistic could also be useful.
nncarlson commentedon Dec 21, 2021
Another timer implementation here.
urbanjost commentedon Dec 21, 2021
https://github.com/urbanjost/M_stopwatch is a version of StopWatch as an
fpm
package as well; albeit I use vendor utilities or gprof(1) myself for optimizing, sometimes I want an embedded timer. I found the dynamic loader module particularly interesting at the previously mentioned site; those are nicely done and look like they would be nice additions to the fpm(1) registry. At a minimum those should be added to the Fortran Wiki site.trippalamb commentedon Apr 7, 2022
I might be missing something, but does the
System_Clock()
internal not already support this basic functionality?