>X<-data[["10x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3076924164.45709258305.05709258305.0Vcells544653741.622267496169.956666022432.4>colStats<- microbenchmark(colAnys= colAnys(X), `apply+any`= apply(X, MARGIN=2L, FUN=any),
+`colSums > 0`= (colSums(X) >0L), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3075852164.35709258305.05709258305.0Vcells544372741.622267496169.956666022432.4>rowStats<- microbenchmark(rowAnys= rowAnys(X), `apply+any`= apply(X, MARGIN=1L, FUN=any),
+`rowSums > 0`= (rowSums(X) >0L), unit="ms")
Table: Benchmarking of colAnys(), apply+any() and colSums > 0() 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
colAnys
0.001409
0.0016820
0.0021317
0.0020960
0.0022740
0.014822
3
colSums > 0
0.003203
0.0035375
0.0045709
0.0040560
0.0046105
0.050292
2
apply+any
0.018943
0.0198790
0.0211223
0.0202665
0.0206385
0.096390
expr
min
lq
mean
median
uq
max
1
colAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
colSums > 0
2.273243
2.103151
2.144281
1.935115
2.027485
3.393064
2
apply+any
13.444287
11.818668
9.908818
9.669132
9.075857
6.503171
Table: Benchmarking of rowAnys(), apply+any() and rowSums > 0() 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
rowAnys
0.001352
0.001613
0.0020306
0.0019925
0.0021370
0.014867
3
rowSums > 0
0.003700
0.004049
0.0048250
0.0044065
0.0047855
0.042995
2
apply+any
0.018271
0.019153
0.0201576
0.0196070
0.0200150
0.066538
expr
min
lq
mean
median
uq
max
1
rowAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
rowSums > 0
2.736686
2.510229
2.376183
2.211543
2.239354
2.891976
2
apply+any
13.514053
11.874148
9.927041
9.840402
9.365934
4.475550
Figure: Benchmarking of colAnys(), apply+any() and colSums > 0() on 10x10 data as well as rowAnys(), apply+any() and rowSums > 0() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAnys() and rowAnys() 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
rowAnys
1.352
1.613
2.03058
1.9925
2.137
14.867
1
colAnys
1.409
1.682
2.13167
2.0960
2.274
14.822
expr
min
lq
mean
median
uq
max
2
rowAnys
1.00000
1.000000
1.000000
1.000000
1.000000
1.0000000
1
colAnys
1.04216
1.042777
1.049784
1.051945
1.064109
0.9969732
Figure: Benchmarking of colAnys() and rowAnys() 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)
Ncells3074405164.25709258305.05709258305.0Vcells524992340.122267496169.956666022432.4>colStats<- microbenchmark(colAnys= colAnys(X), `apply+any`= apply(X, MARGIN=2L, FUN=any),
+`colSums > 0`= (colSums(X) >0L), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3074399164.25709258305.05709258305.0Vcells525496640.122267496169.956666022432.4>rowStats<- microbenchmark(rowAnys= rowAnys(X), `apply+any`= apply(X, MARGIN=1L, FUN=any),
+`rowSums > 0`= (rowSums(X) >0L), unit="ms")
Table: Benchmarking of colAnys(), apply+any() and colSums > 0() 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
colAnys
0.001983
0.0026210
0.0032875
0.0030400
0.003373
0.017689
3
colSums > 0
0.012002
0.0128435
0.0136077
0.0135200
0.013936
0.027762
2
apply+any
0.170574
0.1759735
0.1829443
0.1804605
0.186364
0.307078
expr
min
lq
mean
median
uq
max
1
colAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.00000
3
colSums > 0
6.052446
4.900229
4.139171
4.447368
4.131634
1.56945
2
apply+any
86.018154
67.139832
55.647767
59.362007
55.251705
17.35983
Table: Benchmarking of rowAnys(), apply+any() and rowSums > 0() 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
rowAnys
0.007374
0.007807
0.0090621
0.0084775
0.0089945
0.031446
3
rowSums > 0
0.034992
0.035657
0.0379811
0.0365035
0.0373175
0.072237
2
apply+any
0.128059
0.130017
0.1448516
0.1337435
0.1387050
0.421439
expr
min
lq
mean
median
uq
max
1
rowAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
rowSums > 0
4.745321
4.567311
4.191221
4.305928
4.148924
2.297176
2
apply+any
17.366287
16.653900
15.984387
15.776290
15.421091
13.401991
Figure: Benchmarking of colAnys(), apply+any() and colSums > 0() on 100x100 data as well as rowAnys(), apply+any() and rowSums > 0() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAnys() and rowAnys() 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
colAnys
1.983
2.621
3.28754
3.0400
3.3730
17.689
2
rowAnys
7.374
7.807
9.06207
8.4775
8.9945
31.446
expr
min
lq
mean
median
uq
max
1
colAnys
1.000000
1.000000
1.00000
1.000000
1.000000
1.000000
2
rowAnys
3.718608
2.978634
2.75649
2.788651
2.666617
1.777715
Figure: Benchmarking of colAnys() and rowAnys() 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)
Ncells3075160164.35709258305.05709258305.0Vcells525345340.122267496169.956666022432.4>colStats<- microbenchmark(colAnys= colAnys(X), `apply+any`= apply(X, MARGIN=2L, FUN=any),
+`colSums > 0`= (colSums(X) >0L), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3075151164.35709258305.05709258305.0Vcells525849140.222267496169.956666022432.4>rowStats<- microbenchmark(rowAnys= rowAnys(X), `apply+any`= apply(X, MARGIN=1L, FUN=any),
+`rowSums > 0`= (rowSums(X) >0L), unit="ms")
Table: Benchmarking of colAnys(), apply+any() and colSums > 0() 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
colAnys
0.001420
0.0018105
0.0022909
0.0022640
0.0025450
0.013141
3
colSums > 0
0.011362
0.0117590
0.0125820
0.0125435
0.0131395
0.025477
2
apply+any
0.106342
0.1074235
0.1102312
0.1085720
0.1107750
0.196663
expr
min
lq
mean
median
uq
max
1
colAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
colSums > 0
8.001409
6.494891
5.492084
5.540415
5.162868
1.938741
2
apply+any
74.888732
59.333610
48.116372
47.955830
43.526523
14.965604
Table: Benchmarking of rowAnys(), apply+any() and rowSums > 0() 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
rowAnys
0.007637
0.008313
0.0089298
0.008670
0.0090945
0.033725
2
apply+any
0.062229
0.064914
0.0665394
0.065440
0.0662155
0.121197
3
rowSums > 0
0.133206
0.133676
0.1345420
0.134236
0.1345585
0.157303
expr
min
lq
mean
median
uq
max
1
rowAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
apply+any
8.148357
7.808733
7.451395
7.547866
7.280829
3.593684
3
rowSums > 0
17.442189
16.080356
15.066651
15.482814
14.795591
4.664285
Figure: Benchmarking of colAnys(), apply+any() and colSums > 0() on 1000x10 data as well as rowAnys(), apply+any() and rowSums > 0() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAnys() and rowAnys() 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
colAnys
1.420
1.8105
2.29093
2.264
2.5450
13.141
2
rowAnys
7.637
8.3130
8.92979
8.670
9.0945
33.725
expr
min
lq
mean
median
uq
max
1
colAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowAnys
5.378169
4.591549
3.897889
3.829505
3.573477
2.566395
Figure: Benchmarking of colAnys() and rowAnys() 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)
Ncells3075362164.35709258305.05709258305.0Vcells525417940.122267496169.956666022432.4>colStats<- microbenchmark(colAnys= colAnys(X), `apply+any`= apply(X, MARGIN=2L, FUN=any),
+`colSums > 0`= (colSums(X) >0L), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3075356164.35709258305.05709258305.0Vcells525922240.222267496169.956666022432.4>rowStats<- microbenchmark(rowAnys= rowAnys(X), `apply+any`= apply(X, MARGIN=1L, FUN=any),
+`rowSums > 0`= (rowSums(X) >0L), unit="ms")
Table: Benchmarking of colAnys(), apply+any() and colSums > 0() 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
colAnys
0.007631
0.0084180
0.0103535
0.0094965
0.0109950
0.024751
3
colSums > 0
0.013443
0.0160035
0.0178000
0.0169520
0.0179195
0.052343
2
apply+any
0.748316
0.8504210
0.8765576
0.8680990
0.9004565
1.336996
expr
min
lq
mean
median
uq
max
1
colAnys
1.00000
1.000000
1.000000
1.000000
1.000000
1.000000
3
colSums > 0
1.76163
1.901105
1.719221
1.785079
1.629786
2.114783
2
apply+any
98.06264
101.024115
84.662926
91.412520
81.896908
54.017858
Table: Benchmarking of rowAnys(), apply+any() and rowSums > 0() 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
rowAnys
0.019140
0.0215825
0.0228858
0.0227170
0.0238075
0.035336
3
rowSums > 0
0.028248
0.0306170
0.0329904
0.0321730
0.0332045
0.076977
2
apply+any
0.749158
0.8338955
0.8688107
0.8689875
0.8818345
1.748149
expr
min
lq
mean
median
uq
max
1
rowAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.00000
3
rowSums > 0
1.475862
1.418603
1.441523
1.416252
1.394708
2.17843
2
apply+any
39.140961
38.637577
37.962857
38.252740
37.040197
49.47218
Figure: Benchmarking of colAnys(), apply+any() and colSums > 0() on 10x1000 data as well as rowAnys(), apply+any() and rowSums > 0() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAnys() and rowAnys() 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
colAnys
7.631
8.4180
10.35350
9.4965
10.9950
24.751
2
rowAnys
19.140
21.5825
22.88581
22.7170
23.8075
35.336
expr
min
lq
mean
median
uq
max
1
colAnys
1.00000
1.000000
1.000000
1.000000
1.000000
1.00000
2
rowAnys
2.50819
2.563851
2.210442
2.392145
2.165302
1.42766
Figure: Benchmarking of colAnys() and rowAnys() 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)
Ncells3075581164.35709258305.05709258305.0Vcells525470540.122267496169.956666022432.4>colStats<- microbenchmark(colAnys= colAnys(X), `apply+any`= apply(X, MARGIN=2L, FUN=any),
+`colSums > 0`= (colSums(X) >0L), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3075569164.35709258305.05709258305.0Vcells530473840.522267496169.956666022432.4>rowStats<- microbenchmark(rowAnys= rowAnys(X), `apply+any`= apply(X, MARGIN=1L, FUN=any),
+`rowSums > 0`= (rowSums(X) >0L), unit="ms")
Table: Benchmarking of colAnys(), apply+any() and colSums > 0() 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
colAnys
0.008099
0.0095220
0.0119732
0.0109315
0.012789
0.053653
3
colSums > 0
0.083496
0.0957385
0.0971840
0.0972690
0.099108
0.114800
2
apply+any
1.600610
1.7995685
1.8141498
1.8099180
1.835619
2.166671
expr
min
lq
mean
median
uq
max
1
colAnys
1.00000
1.00000
1.000000
1.000000
1.000000
1.000000
3
colSums > 0
10.30942
10.05445
8.116831
8.898047
7.749472
2.139675
2
apply+any
197.63057
188.99060
151.518174
165.569044
143.531081
40.383035
Table: Benchmarking of rowAnys(), apply+any() and rowSums > 0() 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
rowAnys
0.067779
0.0746215
0.076382
0.0762285
0.0778680
0.092209
3
rowSums > 0
0.223956
0.2489675
0.252571
0.2565880
0.2580455
0.288709
2
apply+any
1.191257
1.2977970
1.325457
1.3312255
1.3451045
1.534203
expr
min
lq
mean
median
uq
max
1
rowAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
rowSums > 0
3.304209
3.336404
3.306683
3.366038
3.313884
3.131028
2
apply+any
17.575606
17.391730
17.353005
17.463619
17.274163
16.638322
Figure: Benchmarking of colAnys(), apply+any() and colSums > 0() on 100x1000 data as well as rowAnys(), apply+any() and rowSums > 0() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAnys() and rowAnys() 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
colAnys
8.099
9.5220
11.97315
10.9315
12.789
53.653
2
rowAnys
67.779
74.6215
76.38199
76.2285
77.868
92.209
expr
min
lq
mean
median
uq
max
1
colAnys
1.000000
1.000000
1.00000
1.000000
1.00000
1.000000
2
rowAnys
8.368811
7.836747
6.37944
6.973288
6.08867
1.718618
Figure: Benchmarking of colAnys() and rowAnys() 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)
Ncells3075793164.35709258305.05709258305.0Vcells525537540.122267496169.956666022432.4>colStats<- microbenchmark(colAnys= colAnys(X), `apply+any`= apply(X, MARGIN=2L, FUN=any),
+`colSums > 0`= (colSums(X) >0L), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3075781164.35709258305.05709258305.0Vcells530540840.522267496169.956666022432.4>rowStats<- microbenchmark(rowAnys= rowAnys(X), `apply+any`= apply(X, MARGIN=1L, FUN=any),
+`rowSums > 0`= (rowSums(X) >0L), unit="ms")
Table: Benchmarking of colAnys(), apply+any() and colSums > 0() 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
colAnys
0.002520
0.0032355
0.0041383
0.003961
0.0044305
0.016411
3
colSums > 0
0.081511
0.0889975
0.0919926
0.091922
0.0958630
0.108950
2
apply+any
0.512329
0.5432960
0.5562859
0.555951
0.5703010
0.645138
expr
min
lq
mean
median
uq
max
1
colAnys
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
3
colSums > 0
32.34563
27.50657
22.22972
23.20677
21.63706
6.63884
2
apply+any
203.30516
167.91717
134.42474
140.35622
128.72159
39.31132
Table: Benchmarking of rowAnys(), apply+any() and rowSums > 0() 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
rowAnys
0.057554
0.0643550
0.0661932
0.0663185
0.0676865
0.114304
3
rowSums > 0
0.314876
0.3501235
0.3556642
0.3596680
0.3608840
0.409574
2
apply+any
0.546965
0.5674115
0.5772502
0.5720150
0.5803790
0.685904
expr
min
lq
mean
median
uq
max
1
rowAnys
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
3
rowSums > 0
5.470966
5.440502
5.373123
5.423343
5.331698
3.583199
2
apply+any
9.503510
8.816899
8.720688
8.625270
8.574516
6.000700
Figure: Benchmarking of colAnys(), apply+any() and colSums > 0() on 1000x100 data as well as rowAnys(), apply+any() and rowSums > 0() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colAnys() and rowAnys() 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
colAnys
2.520
3.2355
4.13827
3.9610
4.4305
16.411
2
rowAnys
57.554
64.3550
66.19320
66.3185
67.6865
114.304
expr
min
lq
mean
median
uq
max
1
colAnys
1.00000
1.00000
1.00000
1.00000
1.0000
1.000000
2
rowAnys
22.83889
19.89028
15.99538
16.74287
15.2774
6.965084
Figure: Benchmarking of colAnys() and rowAnys() on 1000x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.