คำถามติดแท็ก 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)
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.