I have two scripts in R with similar algorithms. I would like to compare them by computational cost. How can I do this calculation?
Thanks.
Raúl
I have two scripts in R with similar algorithms. I would like to compare them by computational cost. How can I do this calculation?
Thanks.
Raúl
This is a duplicate question.
First way:
ptm <- proc.time()
#your function here
proc.time() - ptm
Or another way:
system.time({ #your function here })