>X<-data[["10x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3062839163.65709258305.05709258305.0Vcells533789040.822267496169.956666022432.4>colStats<- microbenchmark(colAlls= colAlls(X), `apply+all`= apply(X, MARGIN=2L, FUN=all),
+`colSums==n`= (colSums(X) == nrow(X)), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061972163.65709258305.05709258305.0Vcells533573040.822267496169.956666022432.4>rowStats<- microbenchmark(rowAlls= rowAlls(X), `apply+all`= apply(X, MARGIN=1L, FUN=all),
+`rowSums==n`= (rowSums(X) == ncol(X)), unit="ms")
Table: Benchmarking of colAlls(), apply+all() and colSums==n() on 10x10 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
0.001456
0.0016925
0.0021430
0.0020870
0.0022825
0.014512
3
colSums==n
0.003712
0.0040890
0.0052483
0.0046245
0.0052255
0.058173
2
apply+all
0.019053
0.0197280
0.0207568
0.0200725
0.0204470
0.064866
expr
min
lq
mean
median
uq
max
1
colAlls
1.00000
1.000000
1.000000
1.000000
1.000000
1.000000
3
colSums==n
2.54945
2.415953
2.449002
2.215860
2.289376
4.008614
2
apply+all
13.08585
11.656130
9.685704
9.617873
8.958160
4.469818
Table: Benchmarking of rowAlls(), apply+all() and rowSums==n() on 10x10 data (transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
rowAlls
0.001317
0.0015415
0.0020103
0.0019760
0.0021695
0.014576
3
rowSums==n
0.003993
0.0044455
0.0053485
0.0048405
0.0053980
0.047883
2
apply+all
0.018248
0.0190860
0.0201142
0.0194350
0.0198600
0.067070
expr
min
lq
mean
median
uq
max
1
rowAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
rowSums==n
3.031891
2.883879
2.660601
2.449646
2.488131
3.285058
2
apply+all
13.855733
12.381447
10.005750
9.835526
9.154183
4.601400
Figure: Benchmarking of colAlls(), apply+all() and colSums==n() on 10x10 data as well as rowAlls(), apply+all() and rowSums==n() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAlls() and rowAlls() on 10x10 data (original and transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
2
rowAlls
1.317
1.5415
2.01026
1.976
2.1695
14.576
1
colAlls
1.456
1.6925
2.14304
2.087
2.2825
14.512
expr
min
lq
mean
median
uq
max
2
rowAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.0000000
1
colAlls
1.105543
1.097957
1.066051
1.056174
1.052086
0.9956092
Figure: Benchmarking of colAlls() and rowAlls() on 10x10 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
100x100 matrix
>X<-data[["100x100"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3060526163.55709258305.05709258305.0Vcells514192639.322267496169.956666022432.4>colStats<- microbenchmark(colAlls= colAlls(X), `apply+all`= apply(X, MARGIN=2L, FUN=all),
+`colSums==n`= (colSums(X) == nrow(X)), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3060520163.55709258305.05709258305.0Vcells514696939.322267496169.956666022432.4>rowStats<- microbenchmark(rowAlls= rowAlls(X), `apply+all`= apply(X, MARGIN=1L, FUN=all),
+`rowSums==n`= (rowSums(X) == ncol(X)), unit="ms")
Table: Benchmarking of colAlls(), apply+all() and colSums==n() on 100x100 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
0.001991
0.0024595
0.0030387
0.0030415
0.0033560
0.013028
3
colSums==n
0.011997
0.0128015
0.0138879
0.0137880
0.0142750
0.028365
2
apply+all
0.170807
0.1723080
0.1772172
0.1734345
0.1762225
0.284037
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.00000
1.000000
1.00000
1.000000
1.000000
3
colSums==n
6.025615
5.20492
4.570314
4.53329
4.253576
2.177234
2
apply+all
85.789553
70.05814
58.319869
57.02269
52.509684
21.802042
Table: Benchmarking of rowAlls(), apply+all() and rowSums==n() on 100x100 data (transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
rowAlls
0.005430
0.005711
0.0063150
0.0061340
0.0064950
0.018429
3
rowSums==n
0.035304
0.035952
0.0366582
0.0365790
0.0370105
0.048019
2
apply+all
0.128607
0.130724
0.1357184
0.1313515
0.1341430
0.266220
expr
min
lq
mean
median
uq
max
1
rowAlls
1.000000
1.00000
1.000000
1.000000
1.000000
1.000000
3
rowSums==n
6.501658
6.29522
5.804955
5.963319
5.698306
2.605622
2
apply+all
23.684530
22.88986
21.491475
21.413678
20.653272
14.445711
Figure: Benchmarking of colAlls(), apply+all() and colSums==n() on 100x100 data as well as rowAlls(), apply+all() and rowSums==n() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAlls() and rowAlls() on 100x100 data (original and transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
1.991
2.4595
3.03871
3.0415
3.356
13.028
2
rowAlls
5.430
5.7110
6.31499
6.1340
6.495
18.429
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.000000
1.000000
1.000000
1.00000
1.000000
2
rowAlls
2.727273
2.322017
2.078181
2.016768
1.93534
1.414569
Figure: Benchmarking of colAlls() and rowAlls() on 100x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
1000x10 matrix
>X<-data[["1000x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061281163.55709258305.05709258305.0Vcells514546039.322267496169.956666022432.4>colStats<- microbenchmark(colAlls= colAlls(X), `apply+all`= apply(X, MARGIN=2L, FUN=all),
+`colSums==n`= (colSums(X) == nrow(X)), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061272163.55709258305.05709258305.0Vcells515049839.322267496169.956666022432.4>rowStats<- microbenchmark(rowAlls= rowAlls(X), `apply+all`= apply(X, MARGIN=1L, FUN=all),
+`rowSums==n`= (rowSums(X) == ncol(X)), unit="ms")
Table: Benchmarking of colAlls(), apply+all() and colSums==n() on 1000x10 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
0.001435
0.0017835
0.0022827
0.0022645
0.0025915
0.011481
3
colSums==n
0.011634
0.0121230
0.0130242
0.0128585
0.0135305
0.026541
2
apply+all
0.104368
0.1063765
0.1080376
0.1072015
0.1078570
0.163115
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
colSums==n
8.107317
6.797309
5.705521
5.678295
5.221107
2.311732
2
apply+all
72.730314
59.644800
47.328023
47.340031
41.619525
14.207386
Table: Benchmarking of rowAlls(), apply+all() and rowSums==n() on 1000x10 data (transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
rowAlls
0.005958
0.006369
0.0072919
0.006920
0.0076210
0.035577
2
apply+all
0.062092
0.064786
0.0664165
0.065730
0.0665915
0.119653
3
rowSums==n
0.133095
0.133928
0.1350352
0.134499
0.1349295
0.159741
expr
min
lq
mean
median
uq
max
1
rowAlls
1.00000
1.00000
1.000000
1.000000
1.000000
1.000000
2
apply+all
10.42162
10.17208
9.108271
9.498555
8.737895
3.363212
3
rowSums==n
22.33887
21.02810
18.518541
19.436272
17.704960
4.490008
Figure: Benchmarking of colAlls(), apply+all() and colSums==n() on 1000x10 data as well as rowAlls(), apply+all() and rowSums==n() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAlls() and rowAlls() on 1000x10 data (original and transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
1.435
1.7835
2.28274
2.2645
2.5915
11.481
2
rowAlls
5.958
6.3690
7.29189
6.9200
7.6210
35.577
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowAlls
4.151916
3.571068
3.194358
3.055862
2.940768
3.098772
Figure: Benchmarking of colAlls() and rowAlls() on 1000x10 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
10x1000 matrix
>X<-data[["10x1000"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061483163.65709258305.05709258305.0Vcells514618039.322267496169.956666022432.4>colStats<- microbenchmark(colAlls= colAlls(X), `apply+all`= apply(X, MARGIN=2L, FUN=all),
+`colSums==n`= (colSums(X) == nrow(X)), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061477163.65709258305.05709258305.0Vcells515122339.422267496169.956666022432.4>rowStats<- microbenchmark(rowAlls= rowAlls(X), `apply+all`= apply(X, MARGIN=1L, FUN=all),
+`rowSums==n`= (rowSums(X) == ncol(X)), unit="ms")
Table: Benchmarking of colAlls(), apply+all() and colSums==n() on 10x1000 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
0.008884
0.010476
0.0122303
0.0118190
0.013187
0.025558
3
colSums==n
0.013942
0.015299
0.0173466
0.0166725
0.018284
0.033008
2
apply+all
0.749683
0.789936
0.8352648
0.8179545
0.861084
1.281145
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
colSums==n
1.569338
1.460386
1.418328
1.410652
1.386517
1.291494
2
apply+all
84.385750
75.404353
68.294713
69.206743
65.297945
50.126966
Table: Benchmarking of rowAlls(), apply+all() and rowSums==n() on 10x1000 data (transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
rowAlls
0.013450
0.0158825
0.0182027
0.0171120
0.0191295
0.040438
3
rowSums==n
0.028157
0.0299995
0.0325026
0.0312035
0.0327855
0.081287
2
apply+all
0.750827
0.7848980
0.8408515
0.8123460
0.8575355
1.320873
expr
min
lq
mean
median
uq
max
1
rowAlls
1.000000
1.00000
1.000000
1.000000
1.000000
1.000000
3
rowSums==n
2.093457
1.88884
1.785592
1.823486
1.713871
2.010164
2
apply+all
55.823569
49.41905
46.193802
47.472300
44.827910
32.664153
Figure: Benchmarking of colAlls(), apply+all() and colSums==n() on 10x1000 data as well as rowAlls(), apply+all() and rowSums==n() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAlls() and rowAlls() on 10x1000 data (original and transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
8.884
10.4760
12.23030
11.819
13.1870
25.558
2
rowAlls
13.450
15.8825
18.20269
17.112
19.1295
40.438
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowAlls
1.513958
1.516084
1.488327
1.447838
1.450633
1.582205
Figure: Benchmarking of colAlls() and rowAlls() on 10x1000 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
100x1000 matrix
>X<-data[["100x1000"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061703163.65709258305.05709258305.0Vcells514671039.322267496169.956666022432.4>colStats<- microbenchmark(colAlls= colAlls(X), `apply+all`= apply(X, MARGIN=2L, FUN=all),
+`colSums==n`= (colSums(X) == nrow(X)), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061691163.65709258305.05709258305.0Vcells519674339.722267496169.956666022432.4>rowStats<- microbenchmark(rowAlls= rowAlls(X), `apply+all`= apply(X, MARGIN=1L, FUN=all),
+`rowSums==n`= (rowSums(X) == ncol(X)), unit="ms")
Table: Benchmarking of colAlls(), apply+all() and colSums==n() on 100x1000 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
0.010682
0.0123640
0.0148551
0.0131580
0.0153845
0.064374
3
colSums==n
0.083959
0.0886235
0.0931459
0.0914115
0.0942260
0.149290
2
apply+all
1.574836
1.6613425
1.7092781
1.7042370
1.7260300
2.316910
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
colSums==n
7.859858
7.167866
6.270311
6.947218
6.124736
2.319104
2
apply+all
147.428946
134.369338
115.063617
129.520976
112.192791
35.991394
Table: Benchmarking of rowAlls(), apply+all() and rowSums==n() on 100x1000 data (transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
rowAlls
0.038797
0.0412470
0.0431752
0.042569
0.0446765
0.060725
3
rowSums==n
0.224029
0.2295035
0.2348777
0.236617
0.2387210
0.265381
2
apply+all
1.158340
1.2152695
1.2458592
1.234323
1.2673915
1.555215
expr
min
lq
mean
median
uq
max
1
rowAlls
1.00000
1.000000
1.000000
1.000000
1.000000
1.00000
3
rowSums==n
5.77439
5.564126
5.440107
5.558434
5.343324
4.37021
2
apply+all
29.85643
29.463222
28.855899
28.995819
28.368191
25.61079
Figure: Benchmarking of colAlls(), apply+all() and colSums==n() on 100x1000 data as well as rowAlls(), apply+all() and rowSums==n() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAlls() and rowAlls() on 100x1000 data (original and transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
10.682
12.364
14.85507
13.158
15.3845
64.374
2
rowAlls
38.797
41.247
43.17520
42.569
44.6765
60.725
expr
min
lq
mean
median
uq
max
1
colAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.0000000
2
rowAlls
3.631998
3.336056
2.906429
3.235218
2.903994
0.9433156
Figure: Benchmarking of colAlls() and rowAlls() on 100x1000 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
1000x100 matrix
>X<-data[["1000x100"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061915163.65709258305.05709258305.0Vcells514737939.322267496169.956666022432.4>colStats<- microbenchmark(colAlls= colAlls(X), `apply+all`= apply(X, MARGIN=2L, FUN=all),
+`colSums==n`= (colSums(X) == nrow(X)), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3061903163.65709258305.05709258305.0Vcells519741239.722267496169.956666022432.4>rowStats<- microbenchmark(rowAlls= rowAlls(X), `apply+all`= apply(X, MARGIN=1L, FUN=all),
+`rowSums==n`= (rowSums(X) == ncol(X)), unit="ms")
Table: Benchmarking of colAlls(), apply+all() and colSums==n() on 1000x100 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
0.002035
0.0028485
0.003774
0.0032960
0.0041875
0.013992
3
colSums==n
0.082210
0.0830130
0.085607
0.0848105
0.0872915
0.101987
2
apply+all
0.486788
0.4983560
0.510808
0.5038850
0.5200695
0.642772
expr
min
lq
mean
median
uq
max
1
colAlls
1.00000
1.00000
1.0000
1.00000
1.00000
1.000000
3
colSums==n
40.39803
29.14271
22.6833
25.73134
20.84573
7.288951
2
apply+all
239.20786
174.95384
135.3489
152.87773
124.19570
45.938536
Table: Benchmarking of rowAlls(), apply+all() and rowSums==n() on 1000x100 data (transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
rowAlls
0.040659
0.0415455
0.0441671
0.0432225
0.0449320
0.067793
3
rowSums==n
0.322712
0.3248410
0.3387711
0.3402920
0.3443395
0.410126
2
apply+all
0.516653
0.5375725
0.5625644
0.5458500
0.5586570
1.268665
expr
min
lq
mean
median
uq
max
1
rowAlls
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
rowSums==n
7.937037
7.818921
7.670212
7.873029
7.663569
6.049681
2
apply+all
12.706978
12.939368
12.737180
12.628839
12.433388
18.713805
Figure: Benchmarking of colAlls(), apply+all() and colSums==n() on 1000x100 data as well as rowAlls(), apply+all() and rowSums==n() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAlls() and rowAlls() on 1000x100 data (original and transposed). The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colAlls
2.035
2.8485
3.77401
3.2960
4.1875
13.992
2
rowAlls
40.659
41.5455
44.16711
43.2225
44.9320
67.793
expr
min
lq
mean
median
uq
max
1
colAlls
1.00000
1.00000
1.00000
1.00000
1.00000
1.000000
2
rowAlls
19.97985
14.58504
11.70297
13.11362
10.73003
4.845126
Figure: Benchmarking of colAlls() and rowAlls() on 1000x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.