Questions tagged «profiling»

3
Fortran:计时代码部分的最佳方法?
有时在优化代码时需要对代码的某些部分进行计时,但我多年来一直在使用以下代码,但想知道是否有更简单/更好的方法来做到这一点? call system_clock(count_rate=clock_rate) !Find the time rate call system_clock(count=clock_start) !Start Timer call do_something_subroutine !This is what gets timed call system_clock(count=clock_stop) ! Stop Timer e_time = real(clock_stop-clock_start)/real(clock_rate)
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.