timing in New Jersey ML
  Home FAQ Contact Sign in
comp.lang.functional only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.functional Profile…
 Up
timing in New Jersey ML         


Author: Mark Tarver
Date: Dec 26, 2006 15:25

How do you time an execution in New Jersey ML?

Mark
6 Comments
Re: timing in New Jersey ML         


Author: Raff
Date: Dec 27, 2006 00:39

Mark Tarver ha scritto:
> How do you time an execution in New Jersey ML?
>
> Mark
>

You can use the Timer, as explained in the following pdf (page 117-118):
"Notes on Programming Standard ML of New Jersey"

http://www.cs.cornell.edu/riccardo/prog-smlnj/notes-011001.pdf

Bye,
Raffaele

--

to email me, d e l e t e CANCELLA from email address
5 Comments
Re: timing in New Jersey ML         


Author: Mark Tarver
Date: Dec 27, 2006 01:52

Raff wrote:
> Mark Tarver ha scritto:
>> How do you time an execution in New Jersey ML?
>>
>> Mark
>>
>
> You can use the Timer, as explained in the following pdf (page 117-118):
> "Notes on Programming Standard ML of New Jersey"
>
> http://www.cs.cornell.edu/riccardo/prog-smlnj/notes-011001.pdf
>
> Bye,
> Raffaele
>
> --
>
> to email me, d e l e t e CANCELLA from email address

Thanks for that. Using CPU time I got;
Show full article (0.58Kb)
4 Comments
Re: timing in New Jersey ML         


Author: Joachim Durchholz
Date: Dec 27, 2006 03:06

Mark Tarver schrieb:
> Thanks for that. Using CPU time I got;
>
> {gc=TIME {sec=0,usec=79000},sys=TIME {sec=0,usec=0}, usr=TIME
> {sec=0,usec=94000}})
>
> Do you know what the units are in this timer?

"usec" usually is the ASCII transliteration of µsec, i.e. microseconds.
So I guess gc is 0.079000 sec, system is 0.000000 sec, usr is 0.094000
sec - probably +/- 0.0005 sec each, since the timer seems to have
millisecond resolution.

Regards,
Jo
no comments
Re: timing in New Jersey ML         


Author: Raff
Date: Dec 27, 2006 03:48

> Thanks for that. Using CPU time I got;
>
> {gc=TIME {sec=0,usec=79000},sys=TIME {sec=0,usec=0}, usr=TIME
> {sec=0,usec=94000}})
>
> Do you know what the units are in this timer?
>
> Mark
>

sec = seconds, usec = microseconds
gc = garbage collection time
sys = system time, that is the time spent in system calls (such as I/O)
usr = user time, that is the cpu time of your execution

So, the gc time was 0.079 seconds, sys time was 0 and usr time was 0.094
seconds
2 Comments
Re: timing in New Jersey ML         


Author: Joachim Durchholz
Date: Dec 27, 2006 05:49

Mark Tarver schrieb:
> Raff wrote:
>>> Thanks for that. Using CPU time I got;
>>>
>>> {gc=TIME {sec=0,usec=79000},sys=TIME {sec=0,usec=0}, usr=TIME
>>> {sec=0,usec=94000}})
>>>
>>> Do you know what the units are in this timer?
>>>
>>> Mark
>>>
>> sec = seconds, usec = microseconds
>> gc = garbage collection time
>> sys = system time, that is the time spent in system calls (such as I/O)
>> usr = user time, that is the cpu time of your execution
>>
>> So, the gc time was 0.079 seconds, sys time was 0 and usr time was 0.094
>> seconds
>
> Thanks for both your answers. Here is another run. ...
Show full article (1.22Kb)
no comments
Re: timing in New Jersey ML         


Author: Raff
Date: Dec 27, 2006 07:29

Mark Tarver ha scritto:
> Thanks for both your answers. Here is another run.
>
> val it =
> ("done",
> {gc=TIME {sec=0,usec=924000},sys=TIME {sec=0,usec=0},
> usr=TIME {sec=1,usec=203000}})
> : string * {gc:Time.time, sys:Time.time, usr:Time.time}
>
> In usr we have sec=1 - is this supposed to be read as
>
> usr = 1 sec + 203000 microseconds = 1.203 secs ?
>
> Mark
>

Yes, 1.203 secs.
Look also at the structure IntervalTimer; the function tick returns the
granularity of the timer, that is the smallest interval of time that the
timers can measure.
Show full article (0.65Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
www.jerseynflstore.cn china wholesale cheap 2008 pro bowl nfl jersey nhl jersey nba jersey in stockalt.tv.americanidol ·