Skip to content

Instantly share code, notes, and snippets.

@1beb
Created May 26, 2011 20:15
Show Gist options
  • Save 1beb/993975 to your computer and use it in GitHub Desktop.
Save 1beb/993975 to your computer and use it in GitHub Desktop.
System.time comparison of rep vs. for loop
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