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 characters
| # The post with benchmarking results is the link given below: | |
| # http://stackoverflow.com/questions/18003717/is-there-any-efficient-way-than-rbind-filllist/18004698#18004698 | |
| # This is the script with which the benchmarking and plots were generated in case anyone else wants to replicate it. | |
| # Note: it takes about 2-3 hours for the benchmarking to finish. | |
| require(plyr) | |
| require(data.table) | |
| require(ggplot2) | |
| require(microbenchmark) |
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 characters
| # version 1.8.10 | |
| require(data.table) | |
| # Loading required package: data.table | |
| # data.table 1.8.10 For help type: help("data.table") | |
| ## create a huge data.table: | |
| ## ------------------------- | |
| set.seed(1) | |
| N <- 2e7 # size of DT |
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 characters
| # version 1.8.11 (commit 1048) | |
| require(data.table) | |
| # Loading required package: data.table | |
| # data.table 1.8.11 For help type: help("data.table") | |
| ## create a huge data.table: | |
| ## ------------------------- | |
| set.seed(1) | |
| N <- 2e7 # size of DT |
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 characters
| # version 1.8.11 (commit 1048) | |
| require(data.table) | |
| # Loading required package: data.table | |
| # data.table 1.8.11 For help type: help("data.table") | |
| ## create a huge data.table: | |
| ## ------------------------- | |
| set.seed(1) | |
| N <- 2e7 # size of DT |
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 characters
| require(reshape2) | |
| # data.table commit (1048) | |
| require(data.table) | |
| # Loading required package: data.table | |
| # data.table 1.8.11 For help type: help("data.table") | |
| set.seed(1) | |
| N <- 2e7 # size of DT |
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 characters
| # version 1.8.11 (commit 1048) | |
| require(data.table) | |
| # Loading required package: data.table | |
| # data.table 1.8.11 For help type: help("data.table") | |
| ## create a huge data.table: | |
| ## ------------------------- | |
| set.seed(1) | |
| N <- 2e7 # size of DT |
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 characters
| require(data.table) | |
| # tested on 1.8.10 AND 1.8.11, results don't differ much at all. | |
| require(plyr) | |
| # 1_8 version | |
| set.seed(1000) # for reproducibility | |
| N <- 1e4 | |
| foo <- function() paste(sample(letters, 10), collapse="") | |
| indices <- replicate(N, foo()) |
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 characters
| from pandas import * | |
| from pandas.util.testing import rands | |
| import random | |
| N = 10000 | |
| ngroups = 10 | |
| def get_test_data(ngroups=100, n=N): | |
| unique_groups = range(ngroups) | |
| arr = np.asarray(np.tile(unique_groups, n / ngroups), dtype=object) |
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 characters
| # version 1.8.11 (commit 1048) | |
| require(data.table) | |
| # Loading required package: data.table | |
| # data.table 1.8.11 For help type: help("data.table") | |
| ## create a huge data.table: | |
| ## ------------------------- | |
| set.seed(1) | |
| N <- 2e7 # size of DT |
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 characters
| # version 1.8.11 | |
| require(data.table) | |
| # Loading required package: data.table | |
| # data.table 1.8.11 For help type: help("data.table") | |
| ## create a huge data.table: | |
| ## ------------------------- | |
| set.seed(1) | |
| N <- 2e7 # size of DT |
OlderNewer