>X<-data[["10x10"]]
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3110114166.15709258305.05709258305.0Vcells585728944.722267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3108840166.15709258305.05709258305.0Vcells585367744.722267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.001095
0.001293
0.0016890
0.00155
0.001870
0.009225
2
apply+cumsum
0.024941
0.025709
0.0269915
0.02597
0.026415
0.100546
expr
min
lq
mean
median
uq
max
1
colCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.0000
2
apply+cumsum
22.77717
19.88322
15.98087
16.75484
14.12567
10.8993
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.001051
0.001536
0.0018836
0.0018205
0.0019985
0.011396
2
apply+cumsum
0.024872
0.025617
0.0274043
0.0260060
0.0265870
0.129755
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+cumsum
23.66508
16.67773
14.54928
14.28509
13.30348
11.38601
Figure: Benchmarking of colCumsums() and apply+cumsum() on integer+10x10 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
colCumsums
1.095
1.293
1.68899
1.5500
1.8700
9.225
2
rowCumsums
1.051
1.536
1.88355
1.8205
1.9985
11.396
expr
min
lq
mean
median
uq
max
1
colCumsums
1.0000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowCumsums
0.9598174
1.187935
1.115193
1.174516
1.068717
1.235339
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3107395166.05709258305.05709258305.0Vcells547016841.822267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3107389166.05709258305.05709258305.0Vcells547521141.822267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.017256
0.0176950
0.0185754
0.0179605
0.018402
0.048429
2
apply+cumsum
0.171849
0.1742205
0.1802480
0.1754160
0.178504
0.320220
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.000000
1.000000
1.00000
1.000000
2
apply+cumsum
9.958797
9.845747
9.703563
9.766766
9.70025
6.612154
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.018053
0.0184745
0.0195422
0.018860
0.0192855
0.043532
2
apply+cumsum
0.172852
0.1743155
0.1798394
0.175312
0.1766195
0.349658
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.000000
1.000000
1.000000
1.00000
1.00000
1.000000
2
apply+cumsum
9.574697
9.435465
9.202626
9.29544
9.15815
8.032206
Figure: Benchmarking of colCumsums() and apply+cumsum() on integer+100x100 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
colCumsums
17.256
17.6950
18.57544
17.9605
18.4020
48.429
2
rowCumsums
18.053
18.4745
19.54218
18.8600
19.2855
43.532
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.0000000
2
rowCumsums
1.046187
1.044052
1.052044
1.050082
1.048011
0.8988829
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3108128166.05709258305.05709258305.0Vcells547368141.822267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3108119166.05709258305.05709258305.0Vcells547871941.822267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.016687
0.017090
0.0179091
0.0174425
0.0177965
0.048515
2
apply+cumsum
0.106618
0.111433
0.1137818
0.1125610
0.1145365
0.199408
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.000000
1.000000
1.0000
1.000000
2
apply+cumsum
6.389285
6.520363
6.353298
6.453261
6.4359
4.110234
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.019551
0.0200910
0.0243383
0.0204990
0.0209795
0.296231
2
apply+cumsum
0.102220
0.1078475
0.1167199
0.1107865
0.1116970
0.717267
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.00000
2
apply+cumsum
5.228377
5.367951
4.795729
5.404483
5.324102
2.42131
Figure: Benchmarking of colCumsums() and apply+cumsum() on integer+1000x10 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
colCumsums
16.687
17.090
17.9091
17.4425
17.7965
48.515
2
rowCumsums
19.551
20.091
24.3383
20.4990
20.9795
296.231
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.0000
1.000000
1.000000
1.000000
1.000000
2
rowCumsums
1.171631
1.1756
1.358991
1.175233
1.178855
6.105967
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3108314166.15709258305.05709258305.0Vcells547436641.822267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3108308166.15709258305.05709258305.0Vcells547940941.922267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.017864
0.0184425
0.0192490
0.0190685
0.0195705
0.032377
2
apply+cumsum
0.752238
0.7930680
0.8180328
0.8109245
0.8310740
1.072476
expr
min
lq
mean
median
uq
max
1
colCumsums
1.00000
1.0000
1.00000
1.00000
1.00000
1.00000
2
apply+cumsum
42.10916
43.0022
42.49742
42.52692
42.46565
33.12463
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.017210
0.0177510
0.0195783
0.0183045
0.0188795
0.046978
2
apply+cumsum
0.753124
0.7921245
0.8118253
0.7999565
0.8167745
1.306501
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+cumsum
43.76084
44.62422
41.46561
43.70272
43.26251
27.81091
Figure: Benchmarking of colCumsums() and apply+cumsum() on integer+10x1000 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
2
rowCumsums
17.210
17.7510
19.57828
18.3045
18.8795
46.978
1
colCumsums
17.864
18.4425
19.24900
19.0685
19.5705
32.377
expr
min
lq
mean
median
uq
max
2
rowCumsums
1.000000
1.000000
1.0000000
1.000000
1.000000
1.0000000
1
colCumsums
1.038001
1.038956
0.9831814
1.041738
1.036601
0.6891949
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3108498166.15709258305.05709258305.0Vcells547484841.822267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3108489166.15709258305.05709258305.0Vcells552488642.222267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.162260
0.164089
0.1729198
0.1711255
0.178054
0.217846
2
apply+cumsum
1.507841
1.556263
1.8620912
1.5888660
1.645371
13.510441
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.00000
1.0000
1.000000
1.00000
2
apply+cumsum
9.292746
9.484258
10.76853
9.2848
9.240857
62.01831
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.163137
0.1675025
0.181545
0.1722575
0.177399
0.84700
2
apply+cumsum
1.528956
1.5720130
1.869777
1.5992720
1.637102
13.08279
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.000000
1.000000
1.00000
1.000000
1.000000
1.00000
2
apply+cumsum
9.372221
9.385012
10.29925
9.284194
9.228361
15.44604
Figure: Benchmarking of colCumsums() and apply+cumsum() on integer+100x1000 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
colCumsums
162.260
164.0890
172.9198
171.1255
178.054
217.846
2
rowCumsums
163.137
167.5025
181.5450
172.2575
177.399
847.000
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.00000
1.000000
1.0000000
1.000000
2
rowCumsums
1.005405
1.020803
1.04988
1.006615
0.9963213
3.888068
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3108691166.15709258305.05709258305.0Vcells547540741.822267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3108685166.15709258305.05709258305.0Vcells552545042.222267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.157001
0.1590005
0.1677189
0.164210
0.1724045
0.201525
2
apply+cumsum
0.850301
0.8738420
1.0361679
0.896856
0.9465080
6.867605
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.00000
2
apply+cumsum
5.415895
5.495844
6.178002
5.461641
5.490042
34.07818
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.170063
0.1724545
0.1847704
0.1794145
0.1843415
0.313704
2
apply+cumsum
0.884892
0.9106820
1.1361354
0.9311325
0.9840030
11.234460
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.000000
1.000000
1.000000
1.00000
1.000000
1.00000
2
apply+cumsum
5.203319
5.280709
6.148905
5.18984
5.337935
35.81229
Figure: Benchmarking of colCumsums() and apply+cumsum() on integer+1000x100 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
colCumsums
157.001
159.0005
167.7189
164.2100
172.4045
201.525
2
rowCumsums
170.063
172.4545
184.7704
179.4145
184.3415
313.704
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.00000
2
rowCumsums
1.083197
1.084616
1.101667
1.092592
1.069238
1.55665
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3108899166.15709258305.05709258305.0Vcells559174942.722267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3108884166.15709258305.05709258305.0Vcells559187742.722267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.000951
0.0013245
0.0016868
0.001563
0.0018685
0.009846
2
apply+cumsum
0.025061
0.0258960
0.0273502
0.026181
0.0264655
0.129141
expr
min
lq
mean
median
uq
max
1
colCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+cumsum
26.35226
19.55153
16.21408
16.75048
14.16404
13.11609
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.001033
0.0014590
0.0018279
0.001752
0.0019580
0.012744
2
apply+cumsum
0.024794
0.0256725
0.0270697
0.025953
0.0263155
0.120387
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.000000
2
apply+cumsum
24.00194
17.59596
14.80912
14.81336
13.43999
9.446563
Figure: Benchmarking of colCumsums() and apply+cumsum() on double+10x10 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
colCumsums
951
1324.5
1686.82
1563
1868.5
9846
2
rowCumsums
1033
1459.0
1827.91
1752
1958.0
12744
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
rowCumsums
1.086225
1.101548
1.083643
1.120921
1.047899
1.294333
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3109077166.15709258305.05709258305.0Vcells559185942.722267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3109071166.15709258305.05709258305.0Vcells560190242.822267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.010349
0.0109360
0.0119258
0.0112805
0.0117620
0.053442
2
apply+cumsum
0.202861
0.2056205
0.2133436
0.2073775
0.2139005
0.353507
expr
min
lq
mean
median
uq
max
1
colCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.000000
2
apply+cumsum
19.60199
18.80217
17.88926
18.38372
18.18573
6.614779
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.008235
0.0088715
0.0095574
0.0093015
0.0098925
0.016764
2
apply+cumsum
0.160743
0.1649900
0.1706646
0.1662630
0.1678295
0.302181
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+cumsum
19.51949
18.59776
17.85673
17.87486
16.96533
18.02559
Figure: Benchmarking of colCumsums() and apply+cumsum() on double+100x100 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
rowCumsums
8.235
8.8715
9.55744
9.3015
9.8925
16.764
1
colCumsums
10.349
10.9360
11.92579
11.2805
11.7620
53.442
expr
min
lq
mean
median
uq
max
2
rowCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
1
colCumsums
1.256709
1.232711
1.247802
1.212761
1.188982
3.187903
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3109267166.15709258305.05709258305.0Vcells559273642.722267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3109261166.15709258305.05709258305.0Vcells560277942.822267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.011687
0.0121495
0.0129607
0.0125775
0.0128600
0.045127
2
apply+cumsum
0.140885
0.1427040
0.1471542
0.1444200
0.1472245
0.239505
expr
min
lq
mean
median
uq
max
1
colCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.000000
2
apply+cumsum
12.05485
11.74567
11.35386
11.48241
11.44825
5.307355
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.010043
0.011007
0.0120208
0.011606
0.0124735
0.030249
2
apply+cumsum
0.099419
0.101546
0.1067722
0.103022
0.1076780
0.180666
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
apply+cumsum
9.899333
9.225584
8.882294
8.876615
8.632541
5.972627
Figure: Benchmarking of colCumsums() and apply+cumsum() on double+1000x10 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
2
rowCumsums
10.043
11.0070
12.02079
11.6060
12.4735
30.249
1
colCumsums
11.687
12.1495
12.96071
12.5775
12.8600
45.127
expr
min
lq
mean
median
uq
max
2
rowCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
1
colCumsums
1.163696
1.103798
1.078191
1.083707
1.030986
1.491851
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3109456166.15709258305.05709258305.0Vcells559375942.722267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3109450166.15709258305.05709258305.0Vcells560380242.822267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.010178
0.011411
0.0123421
0.0118735
0.0123915
0.023636
2
apply+cumsum
0.746431
0.789557
0.8030532
0.7986635
0.8121960
0.877837
expr
min
lq
mean
median
uq
max
1
colCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
2
apply+cumsum
73.33769
69.19262
65.06638
67.26437
65.54461
37.13983
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.009703
0.0110745
0.0118773
0.0114655
0.0121805
0.019422
2
apply+cumsum
0.736904
0.7909285
0.8010720
0.7968600
0.8128895
0.879196
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.000
1.00000
1.0000
1.00000
1.00000
1.00000
2
apply+cumsum
75.946
71.41889
67.4458
69.50068
66.73696
45.26805
Figure: Benchmarking of colCumsums() and apply+cumsum() on double+10x1000 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
2
rowCumsums
9.703
11.0745
11.87727
11.4655
12.1805
19.422
1
colCumsums
10.178
11.4110
12.34206
11.8735
12.3915
23.636
expr
min
lq
mean
median
uq
max
2
rowCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.00000
1
colCumsums
1.048954
1.030385
1.039133
1.035585
1.017323
1.21697
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3109640166.15709258305.05709258305.0Vcells559388242.722267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3109631166.15709258305.05709258305.0Vcells569392043.522267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.092020
0.099466
0.108740
0.1061305
0.1159415
0.170128
2
apply+cumsum
1.846279
1.888750
2.369293
1.9863660
2.2874110
12.396982
expr
min
lq
mean
median
uq
max
1
colCumsums
1.00000
1.0000
1.00000
1.00000
1.00000
1.00000
2
apply+cumsum
20.06389
18.9889
21.78861
18.71626
19.72901
72.86856
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.069659
0.076171
0.1811151
0.086158
0.0939665
9.429972
2
apply+cumsum
1.440417
1.574412
1.9984813
1.764504
1.9370215
12.568730
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.00000
1.00000
1.00000
1.00000
1.00000
1.000000
2
apply+cumsum
20.67812
20.66944
11.03432
20.47987
20.61396
1.332849
Figure: Benchmarking of colCumsums() and apply+cumsum() on double+100x1000 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
2
rowCumsums
69.659
76.171
181.1151
86.1580
93.9665
9429.972
1
colCumsums
92.020
99.466
108.7400
106.1305
115.9415
170.128
expr
min
lq
mean
median
uq
max
2
rowCumsums
1.000000
1.000000
1.0000000
1.000000
1.00000
1.0000000
1
colCumsums
1.321007
1.305825
0.6003916
1.231812
1.23386
0.0180412
Figure: Benchmarking of colCumsums() and rowCumsums() 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)
Ncells3109839166.15709258305.05709258305.0Vcells559510242.722267496169.956666022432.4>colStats<- microbenchmark(colCumsums= colCumsums(X), `apply+cumsum`= apply(X, MARGIN=2L, FUN=cumsum),
+unit="ms")
>X<- t(X)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells3109827166.15709258305.05709258305.0Vcells569513543.522267496169.956666022432.4>rowStats<- microbenchmark(rowCumsums= rowCumsums(X), `apply+cumsum`= apply(X, MARGIN=1L, FUN=cumsum),
+unit="ms")
Table: Benchmarking of colCumsums() and apply+cumsum() 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
colCumsums
0.105626
0.115681
0.1736255
0.1246615
0.131595
5.044977
2
apply+cumsum
0.821538
0.855851
1.0302632
0.9243780
0.997576
6.030735
expr
min
lq
mean
median
uq
max
1
colCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.000000
2
apply+cumsum
7.777801
7.398371
5.933823
7.415104
7.580653
1.195394
Table: Benchmarking of rowCumsums() and apply+cumsum() 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
rowCumsums
0.074125
0.078856
0.0868615
0.085673
0.091320
0.129372
2
apply+cumsum
0.846315
0.916516
1.1850474
1.002492
1.060085
6.211344
expr
min
lq
mean
median
uq
max
1
rowCumsums
1.0000
1.00000
1.00000
1.00000
1.00000
1.0000
2
apply+cumsum
11.4174
11.62265
13.64296
11.70137
11.60846
48.0115
Figure: Benchmarking of colCumsums() and apply+cumsum() on double+1000x100 data as well as rowCumsums() and apply+cumsum() on the same data transposed. Outliers are displayed as crosses. Times are in milliseconds.
Table: Benchmarking of colCumsums() and rowCumsums() 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
2
rowCumsums
74.125
78.856
86.86148
85.6730
91.320
129.372
1
colCumsums
105.626
115.681
173.62553
124.6615
131.595
5044.977
expr
min
lq
mean
median
uq
max
2
rowCumsums
1.000000
1.000000
1.000000
1.000000
1.000000
1.0000
1
colCumsums
1.424971
1.466991
1.998878
1.455085
1.441032
38.9959
Figure: Benchmarking of colCumsums() and rowCumsums() on double+1000x100 data (original and transposed). Outliers are displayed as crosses. Times are in milliseconds.