comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: how to get time consumed by idl program?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: how to get time consumed by idl program? [message #32372] Sun, 06 October 2002 00:58
waynedou is currently offline  waynedou
Messages: 3
Registered: September 2002
Junior Member
thank you all. yesterday i used systime() to do the job, but it
doesn't work, just now i used systime(1) and i've got the result. now
i'm trying profiler.

thank you very much!
Re: how to get time consumed by idl program? [message #32373 is a reply to message #32372] Sat, 05 October 2002 09:18 Go to previous message
R.Bauer is currently offline  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 Go to previous message
Ralf Flicker is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how to get time consumed by idl program?
Next Topic: Got my code into IDL 5.6!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:44:01 PDT 2025

Total time taken to generate the page: 0.00556 seconds