measuring computation time

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

measuring computation time

Taka Matzmoto
Hi R users

Is there any function or command for measureing computation time?

For example, if I like to how long it takes to generate 100000 random
numbers from a normal

distribution, Is there any command I can wrap up around "rnorm(100000,0,1)"
and returns time

in a sec unit ?

Thanks

TM

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: measuring computation time

Romain François
Selon Taka Matzmoto <[hidden email]>:

> Hi R users
>
> Is there any function or command for measureing computation time?
>
> For example, if I like to how long it takes to generate 100000 random
> numbers from a normal
>
> distribution, Is there any command I can wrap up around "rnorm(100000,0,1)"
> and returns time
>
> in a sec unit ?
>
> Thanks
>
> TM

Hint :

> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

there is

system.time(rnorm(100000,0,1))

RSiteSearch("time") would have told you that

Romain

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html