Created
December 5, 2014 16:00
-
-
Save yutannihilation/30e394ac580058f3bce7 to your computer and use it in GitHub Desktop.
speed of `base::+` and `.Primitive("+")`
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
> a <- runif(1000,1,10) | |
> microbenchmark(base::`+`(a, a), .Primitive("+")(a,a)) | |
Unit: microseconds | |
expr min lq mean median uq max neval | |
base::`+`(a, a) 14.527 16.483 28.85315 19.556 20.6730 716.852 100 | |
.Primitive("+")(a, a) 5.308 6.147 9.96258 9.220 10.1975 49.448 100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment