Created
May 26, 2011 20:15
-
-
Save 1beb/993975 to your computer and use it in GitHub Desktop.
System.time comparison of rep vs. for loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system.time(for(x in 1:10000) {print("Hello world")}) ## 0.54 | |
system.time(print(rep("Hello world",10000))) ## 0.12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment