|
Re: how to get time consumed by idl program? [message #32373 is a reply to message #32372] |
Sat, 05 October 2002 09:18  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Wayne Dou wrote:
> i am a beginner of idl, and i am anxious to compare idl with other
> softwares such as matlab, but i don't know how to calculate the time
> idl program used to complete a task, i am wondering if there is a
> function to do the job.
>
> thank you!
Dear Wayne,
if you like to know how much time two steps take you can try
systime as described by Ralf.
Another tool is the profiler. The online help tolds
The PROFILER procedure allows you to access the IDL Code Profiler. The IDL
Code Profiler helps you analyze the performance of your applications. You
can easily monitor the calling frequency and execution time for procedures
and functions.
there is an example in the help described too.
regards
Reimar
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: how to get time consumed by idl program? [message #32375 is a reply to message #32373] |
Sat, 05 October 2002 06:05  |
Ralf Flicker
Messages: 19 Registered: October 2001
|
Junior Member |
|
|
Wayne Dou wrote:
>
> i am a beginner of idl, and i am anxious to compare idl with other
> softwares such as matlab, but i don't know how to calculate the time
> idl program used to complete a task, i am wondering if there is a
> function to do the job.
A simple way to clock something specific is to use the "systime"
function, for instance:
t0 = systime(1)
; code your process here
t1 = systime(1)
elapsed = t1-t0
There are IDL benchmarking routines (time_test2.pro) that can
gauge the performance of IDL on different computers, but I don't
know how useful that is for comparing with different programs (I
don't know what Matlab might have implemented). I alway write my
own benchmarking code to test a few specific operations like I
showed above (for instance FFTs, matrix multiplications, splines
and interpolations etc).
I actually have a question to the same effect as yours, but
concerning Yorick, so I'll post that in a separate thread.
ralf
|
|
|