>X<-data[["10x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3148394168.25709258305.05709258305.0Vcells613351746.822267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146917168.15709258305.05709258305.0Vcells612925546.822267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on integer+10x10 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.001423
0.0016740
0.0024066
0.0021500
0.002920
0.013546
2
apply+median
0.248046
0.2501115
0.2544108
0.2516985
0.253451
0.436424
expr
min
lq
mean
median
uq
max
1
colMedians
1.000
1.0000
1.0000
1.0000
1.00000
1.00000
2
apply+median
174.312
149.4095
105.7134
117.0691
86.79829
32.21792
Table: Benchmarking of rowMedians() and apply+median() on integer+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
rowMedians
0.001406
0.0017075
0.0025164
0.0027120
0.002945
0.012756
2
apply+median
0.246852
0.2505395
0.2546976
0.2519685
0.253652
0.450944
expr
min
lq
mean
median
uq
max
1
rowMedians
1.0000
1.0000
1.0000
1.00000
1.00000
1.00000
2
apply+median
175.5704
146.7288
101.2151
92.90874
86.12971
35.35152
Figure: Benchmarking of colMedians() and apply+median() on integer+10x10 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on integer+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
1
colMedians
1.423
1.6740
2.40661
2.150
2.920
13.546
2
rowMedians
1.406
1.7075
2.51640
2.712
2.945
12.756
expr
min
lq
mean
median
uq
max
1
colMedians
1.0000000
1.000000
1.00000
1.000000
1.000000
1.0000000
2
rowMedians
0.9880534
1.020012
1.04562
1.261395
1.008562
0.9416802
Figure: Benchmarking of colMedians() and rowMedians() on integer+10x10 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
100x100 integer matrix
>X<-data[["100x100"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3145475168.05709258305.05709258305.0Vcells574575143.922267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3145466168.05709258305.05709258305.0Vcells575078943.922267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on integer+100x100 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.109616
0.112410
0.1167811
0.115310
0.116568
0.161789
2
apply+median
2.574255
2.610474
2.7723719
2.637329
2.728289
10.863687
expr
min
lq
mean
median
uq
max
1
colMedians
1.0000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+median
23.4843
23.22279
23.73991
22.87164
23.40512
67.14725
Table: Benchmarking of rowMedians() and apply+median() on integer+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
rowMedians
0.109995
0.111854
0.1175396
0.115371
0.116633
0.206936
2
apply+median
2.582868
2.616979
2.7824168
2.657897
2.735140
10.650263
expr
min
lq
mean
median
uq
max
1
rowMedians
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+median
23.48169
23.39638
23.67216
23.03782
23.45082
51.46646
Figure: Benchmarking of colMedians() and apply+median() on integer+100x100 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on integer+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
colMedians
109.616
112.410
116.7811
115.310
116.568
161.789
2
rowMedians
109.995
111.854
117.5396
115.371
116.633
206.936
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.0000000
1.000000
1.000000
1.000000
1.000000
2
rowMedians
1.003457
0.9950538
1.006496
1.000529
1.000558
1.279049
Figure: Benchmarking of colMedians() and rowMedians() on integer+100x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
1000x10 integer matrix
>X<-data[["1000x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146205168.15709258305.05709258305.0Vcells574925843.922267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146196168.15709258305.05709258305.0Vcells575429644.022267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on integer+1000x10 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.098588
0.1006090
0.1023026
0.102130
0.1031450
0.139008
2
apply+median
0.443335
0.4537355
0.4630561
0.460301
0.4701085
0.610789
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.00000
1.000000
1.000000
1.000000
1.000000
2
apply+median
4.496846
4.50989
4.526339
4.507011
4.557744
4.393913
Table: Benchmarking of rowMedians() and apply+median() on integer+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
rowMedians
0.099118
0.1013455
0.1033351
0.1034135
0.104261
0.143447
2
apply+median
0.445403
0.4543925
0.4675050
0.4656450
0.474332
0.610581
expr
min
lq
mean
median
uq
max
1
rowMedians
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
apply+median
4.493664
4.483598
4.524166
4.502749
4.549467
4.256492
Figure: Benchmarking of colMedians() and apply+median() on integer+1000x10 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on integer+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
colMedians
98.588
100.6090
102.3026
102.1300
103.145
139.008
2
rowMedians
99.118
101.3455
103.3351
103.4135
104.261
143.447
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.00000
1.000000
1.000000
1.00000
1.000000
2
rowMedians
1.005376
1.00732
1.010093
1.012567
1.01082
1.031933
Figure: Benchmarking of colMedians() and rowMedians() on integer+1000x10 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
10x1000 integer matrix
>X<-data[["10x1000"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146394168.15709258305.05709258305.0Vcells574993843.922267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146385168.15709258305.05709258305.0Vcells575497644.022267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on integer+10x1000 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.117463
0.1231185
0.1348281
0.137208
0.1425285
0.174475
2
apply+median
23.386243
23.8971810
25.5755624
24.488757
25.7706055
38.426301
expr
min
lq
mean
median
uq
max
1
colMedians
1.0000
1.000
1.0000
1.0000
1.0000
1.0000
2
apply+median
199.0945
194.099
189.6902
178.4791
180.8102
220.2396
Table: Benchmarking of rowMedians() and apply+median() on integer+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
rowMedians
0.118322
0.1241225
0.139761
0.1424645
0.1482465
0.181293
2
apply+median
23.323961
23.8218750
25.736911
24.6920935
25.9868975
42.304547
expr
min
lq
mean
median
uq
max
1
rowMedians
1.0000
1.0000
1.0000
1.000
1.0000
1.000
2
apply+median
197.1228
191.9223
184.1495
173.321
175.2952
233.349
Figure: Benchmarking of colMedians() and apply+median() on integer+10x1000 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on integer+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
colMedians
117.463
123.1185
134.8281
137.2080
142.5285
174.475
2
rowMedians
118.322
124.1225
139.7610
142.4645
148.2465
181.293
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.00000
1.000000
1.000000
2
rowMedians
1.007313
1.008155
1.036586
1.03831
1.040118
1.039077
Figure: Benchmarking of colMedians() and rowMedians() on integer+10x1000 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
100x1000 integer matrix
>X<-data[["100x1000"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146575168.15709258305.05709258305.0Vcells575041943.922267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146566168.15709258305.05709258305.0Vcells580045744.322267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on integer+100x1000 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
1.083893
1.096217
1.135232
1.10672
1.13207
1.424282
2
apply+median
25.685347
26.059254
28.176103
26.70994
27.97560
40.550065
expr
min
lq
mean
median
uq
max
1
colMedians
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+median
23.69731
23.77198
24.81969
24.13432
24.71191
28.47053
Table: Benchmarking of rowMedians() and apply+median() on integer+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
rowMedians
1.098262
1.131919
1.188056
1.17516
1.187909
1.531868
2
apply+median
25.894567
26.398205
28.532177
27.38014
28.505834
39.601564
expr
min
lq
mean
median
uq
max
1
rowMedians
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+median
23.57777
23.32163
24.01586
23.29908
23.99665
25.85181
Figure: Benchmarking of colMedians() and apply+median() on integer+100x1000 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on integer+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
colMedians
1.083893
1.096217
1.135232
1.10672
1.132070
1.424282
2
rowMedians
1.098262
1.131919
1.188056
1.17516
1.187909
1.531868
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.00000
1.000000
1.000000
2
rowMedians
1.013257
1.032569
1.046531
1.06184
1.049325
1.075537
Figure: Benchmarking of colMedians() and rowMedians() on integer+100x1000 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
1000x100 integer matrix
>X<-data[["1000x100"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146771168.15709258305.05709258305.0Vcells575099743.922267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146762168.15709258305.05709258305.0Vcells580103544.322267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on integer+1000x100 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.954607
0.9608395
0.9816954
0.968706
0.984626
1.169861
2
apply+median
4.170526
4.2111795
4.3670111
4.244028
4.313897
12.638877
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.000000
1.000000
1.00000
2
apply+median
4.368841
4.382813
4.448438
4.381131
4.381254
10.80374
Table: Benchmarking of rowMedians() and apply+median() on integer+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
rowMedians
0.978798
0.9875265
1.001061
0.992718
1.001716
1.176836
2
apply+median
4.191627
4.2368835
4.425128
4.274832
4.343601
13.118333
expr
min
lq
mean
median
uq
max
1
rowMedians
1.000000
1.0000
1.000000
1.00000
1.00000
1.00000
2
apply+median
4.282423
4.2904
4.420437
4.30619
4.33616
11.14712
Figure: Benchmarking of colMedians() and apply+median() on integer+1000x100 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on integer+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
colMedians
954.607
960.8395
981.6954
968.706
984.626
1169.861
2
rowMedians
978.798
987.5265
1001.0613
992.718
1001.716
1176.836
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowMedians
1.025341
1.027775
1.019727
1.024788
1.017357
1.005962
Figure: Benchmarking of colMedians() and rowMedians() on integer+1000x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
>X<-data[["10x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146982168.15709258305.05709258305.0Vcells586740644.822267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3146961168.15709258305.05709258305.0Vcells586752444.822267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on double+10x10 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.002052
0.002413
0.0033440
0.0028420
0.0040460
0.013901
2
apply+median
0.253187
0.255719
0.2623944
0.2575165
0.2596935
0.436757
expr
min
lq
mean
median
uq
max
1
colMedians
1.0000
1.0000
1.00000
1.00000
1.00000
1.00000
2
apply+median
123.3855
105.9755
78.46652
90.61101
64.18524
31.41911
Table: Benchmarking of rowMedians() and apply+median() on double+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
rowMedians
0.002051
0.0025470
0.0035260
0.0038125
0.004020
0.013935
2
apply+median
0.252701
0.2554865
0.2592114
0.2568135
0.258696
0.434011
expr
min
lq
mean
median
uq
max
1
rowMedians
1.0000
1.0000
1.00000
1.00000
1.00000
1.00000
2
apply+median
123.2087
100.3088
73.51491
67.36092
64.35224
31.14539
Figure: Benchmarking of colMedians() and apply+median() on double+10x10 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on double+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
1
colMedians
2.052
2.413
3.34403
2.8420
4.046
13.901
2
rowMedians
2.051
2.547
3.52597
3.8125
4.020
13.935
expr
min
lq
mean
median
uq
max
1
colMedians
1.0000000
1.000000
1.000000
1.000000
1.0000000
1.000000
2
rowMedians
0.9995127
1.055532
1.054407
1.341485
0.9935739
1.002446
Figure: Benchmarking of colMedians() and rowMedians() on double+10x10 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
100x100 double matrix
>X<-data[["100x100"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147157168.15709258305.05709258305.0Vcells586751144.822267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147148168.15709258305.05709258305.0Vcells587754944.922267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on double+100x100 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.175608
0.1790945
0.1883326
0.182464
0.190529
0.270138
2
apply+median
2.728487
2.7579685
2.9788384
2.830185
2.951084
12.306626
expr
min
lq
mean
median
uq
max
1
colMedians
1.00000
1.00000
1.0000
1.00000
1.0000
1.00000
2
apply+median
15.53737
15.39952
15.8169
15.51093
15.4889
45.55681
Table: Benchmarking of rowMedians() and apply+median() on double+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
rowMedians
0.175110
0.177632
0.1931822
0.180092
0.196236
0.27076
2
apply+median
2.687166
2.725458
3.1147334
2.814103
3.208063
12.61086
expr
min
lq
mean
median
uq
max
1
rowMedians
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+median
15.34559
15.34328
16.12329
15.62592
16.34798
46.57579
Figure: Benchmarking of colMedians() and apply+median() on double+100x100 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on double+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
2
rowMedians
175.110
177.6320
193.1822
180.092
196.236
270.760
1
colMedians
175.608
179.0945
188.3326
182.464
190.529
270.138
expr
min
lq
mean
median
uq
max
2
rowMedians
1.000000
1.000000
1.000000
1.000000
1.0000000
1.0000000
1
colMedians
1.002844
1.008233
0.974896
1.013171
0.9709177
0.9977028
Figure: Benchmarking of colMedians() and rowMedians() on double+100x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
1000x10 double matrix
>X<-data[["1000x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147347168.15709258305.05709258305.0Vcells586840644.822267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147338168.15709258305.05709258305.0Vcells587844444.922267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on double+1000x10 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.164355
0.165701
0.1676767
0.1666995
0.167651
0.196310
2
apply+median
0.564931
0.572115
0.5792054
0.5771955
0.581564
0.738975
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
apply+median
3.437261
3.452695
3.454299
3.462491
3.468897
3.764327
Table: Benchmarking of rowMedians() and apply+median() on double+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
rowMedians
0.165467
0.1670745
0.1699849
0.168743
0.1698615
0.233873
2
apply+median
0.519870
0.5268825
0.5388262
0.532013
0.5394455
0.712988
expr
min
lq
mean
median
uq
max
1
rowMedians
1.000000
1.000000
1.000000
1.0000
1.000000
1.000000
2
apply+median
3.141835
3.153578
3.169848
3.1528
3.175796
3.048612
Figure: Benchmarking of colMedians() and apply+median() on double+1000x10 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on double+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
colMedians
164.355
165.7010
167.6767
166.6995
167.6510
196.310
2
rowMedians
165.467
167.0745
169.9849
168.7430
169.8615
233.873
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowMedians
1.006766
1.008289
1.013766
1.012259
1.013185
1.191345
Figure: Benchmarking of colMedians() and rowMedians() on double+1000x10 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
10x1000 double matrix
>X<-data[["10x1000"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147536168.15709258305.05709258305.0Vcells586945044.822267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147527168.15709258305.05709258305.0Vcells587948844.922267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on double+10x1000 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
0.187505
0.1898935
0.2009421
0.2010535
0.204783
0.269487
2
apply+median
23.604804
24.2873645
25.9720811
24.9555915
26.082657
40.187996
expr
min
lq
mean
median
uq
max
1
colMedians
1.0000
1.0000
1.0000
1.0000
1.0000
1.0000
2
apply+median
125.8889
127.8999
129.2516
124.1241
127.3673
149.1278
Table: Benchmarking of rowMedians() and apply+median() on double+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
rowMedians
0.187344
0.189299
0.2021045
0.2026505
0.206341
0.254486
2
apply+median
23.749928
24.189493
28.2420950
24.7616655
26.200569
275.449402
expr
min
lq
mean
median
uq
max
1
rowMedians
1.0000
1.0000
1.0000
1.000
1.000
1.000
2
apply+median
126.7718
127.7846
139.7401
122.189
126.977
1082.375
Figure: Benchmarking of colMedians() and apply+median() on double+10x1000 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on double+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
colMedians
187.505
189.8935
200.9421
201.0535
204.783
269.487
2
rowMedians
187.344
189.2990
202.1045
202.6505
206.341
254.486
expr
min
lq
mean
median
uq
max
1
colMedians
1.0000000
1.0000000
1.000000
1.000000
1.000000
1.000000
2
rowMedians
0.9991414
0.9968693
1.005785
1.007943
1.007608
0.944335
Figure: Benchmarking of colMedians() and rowMedians() on double+10x1000 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
100x1000 double matrix
>X<-data[["100x1000"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147717168.25709258305.05709258305.0Vcells586956844.822267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147708168.25709258305.05709258305.0Vcells596960645.622267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on double+100x1000 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
1.717125
1.74174
1.796505
1.757344
1.794398
2.231628
2
apply+median
27.228123
27.45129
29.604891
28.156392
29.288622
41.757641
expr
min
lq
mean
median
uq
max
1
colMedians
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+median
15.85681
15.76084
16.47916
16.02213
16.32225
18.71174
Table: Benchmarking of rowMedians() and apply+median() on double+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
rowMedians
1.728971
1.783241
1.870608
1.862461
1.910765
2.329959
2
apply+median
26.920152
27.245376
29.599800
28.054550
29.389402
54.122493
expr
min
lq
mean
median
uq
max
1
rowMedians
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+median
15.57004
15.27858
15.82362
15.06316
15.38096
23.22895
Figure: Benchmarking of colMedians() and apply+median() on double+100x1000 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on double+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
colMedians
1.717125
1.741740
1.796505
1.757344
1.794398
2.231628
2
rowMedians
1.728971
1.783241
1.870608
1.862461
1.910765
2.329959
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.000000
1.00000
1.000000
2
rowMedians
1.006899
1.023827
1.041249
1.059816
1.06485
1.044062
Figure: Benchmarking of colMedians() and rowMedians() on double+100x1000 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.
1000x100 double matrix
>X<-data[["1000x100"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147913168.25709258305.05709258305.0Vcells587080744.822267496169.956666022432.4>colStats<- microbenchmark(colMedians= colMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=2L,
+FUN=median, na.rm=FALSE), unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3147904168.25709258305.05709258305.0Vcells597084545.622267496169.956666022432.4>rowStats<- microbenchmark(rowMedians= rowMedians(X, na.rm=FALSE), `apply+median`= apply(X, MARGIN=1L,
+FUN=median, na.rm=FALSE), unit="ms")
Table: Benchmarking of colMedians() and apply+median() on double+1000x100 data. The top panel shows times in milliseconds and the bottom panel shows relative times.
expr
min
lq
mean
median
uq
max
1
colMedians
1.619787
1.641606
1.678234
1.666539
1.69203
2.062155
2
apply+median
4.969596
5.031284
5.313666
5.066277
5.13795
13.545102
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.000000
1.00000
1.000000
2
apply+median
3.068055
3.064855
3.166225
3.039999
3.03656
6.568421
Table: Benchmarking of rowMedians() and apply+median() on double+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
rowMedians
1.655235
1.68752
1.728076
1.711755
1.739273
2.180682
2
apply+median
5.007882
5.11950
5.400718
5.181375
5.232999
12.726529
expr
min
lq
mean
median
uq
max
1
rowMedians
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
apply+median
3.025481
3.033743
3.125279
3.026936
3.008727
5.836032
Figure: Benchmarking of colMedians() and apply+median() on double+1000x100 data as well as rowMedians() and apply+median() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colMedians() and rowMedians() on double+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
colMedians
1.619787
1.641606
1.678234
1.666539
1.692030
2.062155
2
rowMedians
1.655235
1.687520
1.728076
1.711755
1.739273
2.180682
expr
min
lq
mean
median
uq
max
1
colMedians
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowMedians
1.021884
1.027969
1.029699
1.027132
1.027921
1.057477
Figure: Benchmarking of colMedians() and rowMedians() on double+1000x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.