Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(microbenchmark)
- x <- sample(100000)
- microbenchmark(x[order(x, method = "auto")],
- x[order(x, method = "shell")],
- x[order(x, method = "radix")])
- # Unit: milliseconds
- # expr min lq mean median uq max
- # x[order(x, method = "auto")] 1.790454 1.863924 2.128368 1.930263 2.362573 3.328237
- # x[order(x, method = "shell")] 17.530465 17.991802 18.914891 18.641179 19.763667 21.762103
- # x[order(x, method = "radix")] 1.791103 1.847488 2.439882 1.975531 2.265257 33.209701
- # neval
- # 100
- # 100
- # 100
Add Comment
Please, Sign In to add comment