Last active
August 2, 2020 02:39
-
-
Save JackHo327/c9b1f89fc22404b8d38d4c8c94e8bcd3 to your computer and use it in GitHub Desktop.
Revisions
-
JackHo327 revised this gist
Aug 2, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,5 +8,5 @@ # firstly, type "?microbenchmark" to check its user doc > microbenchmark(for_fun(100000), times = 100) Unit: milliseconds expr min lq mean median uq max neval for_fun(1e+05) 94.68666 105.8318 112.9071 107.9177 112.2817 183.2506 100 -
JackHo327 renamed this gist
Aug 2, 2020 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ > ret <- numeric(100000) > for_fun <- function(x){ for(i in 1:x){ ret[i] <- i^2 -
JackHo327 revised this gist
Jul 2, 2020 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,13 @@ > ret <- numeric(100000) > for_fun <- function(x){ for(i in 1:x){ ret[i] <- i^2 } } # firstly, type "?microbenchmark" to check its user doc > microbenchmark(for_fun(100000), times = 100) Unit: milliseconds expr min lq mean median uq max neval for_fun(1e+05) 94.68666 105.8318 112.9071 107.9177 112.2817 183.2506 100 -
JackHo327 revised this gist
Jul 2, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ ret <- numeric(100000) for_fun <- function(x){ for(i in 1:x){ ret[i] <- i^2 -
JackHo327 revised this gist
Jul 2, 2020 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ ret <- numeric(100000) for_fun <- function(x){ for(i in 1:x){ ret[i] <- i^2 } } # firstly, type "?microbenchmark" to check its user doc microbenchmark(for_fun(100000), times = 100) Unit: milliseconds expr min lq mean median uq max neval for_fun(1e+05) 94.68666 105.8318 112.9071 107.9177 112.2817 183.2506 100 -
JackHo327 created this gist
Jul 2, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ > ret <- numeric(100000) > for_fun <- function(x){ + for(i in 1:x){ + ret[i] <- i^2 + } + } # firstly, type "?microbenchmark" to check its user doc > microbenchmark(for_fun(100000), times = 100) Unit: milliseconds expr min lq mean median uq max neval for_fun(1e+05) 94.68666 105.8318 112.9071 107.9177 112.2817 183.2506 100