Guest User

Untitled

a guest
May 26th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. library(microbenchmark)
  2. x <- sample(100000)
  3. microbenchmark(x[order(x, method = "auto")],
  4. x[order(x, method = "shell")],
  5. x[order(x, method = "radix")])
  6. # Unit: milliseconds
  7. # expr min lq mean median uq max
  8. # x[order(x, method = "auto")] 1.790454 1.863924 2.128368 1.930263 2.362573 3.328237
  9. # x[order(x, method = "shell")] 17.530465 17.991802 18.914891 18.641179 19.763667 21.762103
  10. # x[order(x, method = "radix")] 1.791103 1.847488 2.439882 1.975531 2.265257 33.209701
  11. # neval
  12. # 100
  13. # 100
  14. # 100
Add Comment
Please, Sign In to add comment