I am doing some timing experiments. To test looping performance, I used the Sys.sleep function. I noticed something in the docs that is just a little misleading:
" The resolution of the time interval is system-dependent, but will normally be down to 0.02 secs or better. (On modern Unix-alikes it will be better than 1ms.)" on OSX, which is (almost) a modern Unix-alike, and a very common platform, > system.time( for (i in 1:100) Sys.sleep(0.001) ) user system elapsed 0.005 0.004 1.020 > system.time( for (i in 1:100) Sys.sleep(0.01) ) user system elapsed 0.005 0.004 1.019 so, the resolution seems to be about 0.01 seconds. under linux, similar time experiments show that the resolution is under 0.0001 seconds. just wanted to put this into the r-archives for google searches. (if I could make changes to the docs, I would note it there instead.) hope this helps someone else... iaw ---- Ivo Welch (ivo.we...@brown.edu, ivo.we...@gmail.com) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.