This document identifies computational bottlenecks in functions from benchmark.R
.
Tables of most expensive function calls
Below, two tables for all test functions present profiling results with set_default_options()
and set_fast_options()
respectively.
Function: bfast.olscusum
(TOTAL) |
9.330 |
1.0000000 |
bfast |
9.330 |
1.0000000 |
breakpoints |
9.160 |
0.9817792 |
breakpoints.formula |
8.410 |
0.9013934 |
recresid |
5.660 |
0.6066452 |
recresid.default |
5.645 |
0.6050375 |
extend.RSS.table |
2.520 |
0.2700965 |
as.vector |
1.380 |
0.1479100 |
outer |
1.265 |
0.1355841 |
breakpoints.breakpointsfull |
0.930 |
0.0996785 |
summary.breakpointsfull |
0.880 |
0.0943194 |
RSS |
0.815 |
0.0873526 |
confint.breakpointsfull |
0.470 |
0.0503751 |
as.character |
0.400 |
0.0428725 |
lm.fit |
0.315 |
0.0337621 |
lm |
0.280 |
0.0300107 |
%*% |
0.250 |
0.0267953 |
breakfactor |
0.200 |
0.0214362 |
(TOTAL) |
2.010 |
1.0000000 |
bfast |
2.010 |
1.0000000 |
breakpoints |
1.830 |
0.9104478 |
breakpoints.breakpointsfull |
1.130 |
0.5621891 |
summary.breakpointsfull |
1.060 |
0.5273632 |
breakpoints.formula |
0.925 |
0.4601990 |
confint.breakpointsfull |
0.550 |
0.2736318 |
lm |
0.325 |
0.1616915 |
RSS |
0.270 |
0.1343284 |
breakfactor |
0.245 |
0.1218905 |
residuals.breakpointsfull |
0.225 |
0.1119403 |
as.character |
0.185 |
0.0920398 |
breakdates |
0.060 |
0.0298507 |
breakdates.breakpoints |
0.060 |
0.0298507 |
pargmaxV |
0.045 |
0.0223881 |
Function: bfast.olsmosum
(TOTAL) |
8.270 |
1.0000000 |
bfast |
8.270 |
1.0000000 |
breakpoints |
7.935 |
0.9594921 |
breakpoints.formula |
7.160 |
0.8657799 |
recresid |
4.435 |
0.5362757 |
recresid.default |
4.415 |
0.5338573 |
extend.RSS.table |
2.465 |
0.2980653 |
as.vector |
1.045 |
0.1263603 |
breakpoints.breakpointsfull |
0.990 |
0.1197098 |
outer |
0.950 |
0.1148730 |
summary.breakpointsfull |
0.915 |
0.1106409 |
RSS |
0.885 |
0.1070133 |
confint.breakpointsfull |
0.500 |
0.0604595 |
as.character |
0.390 |
0.0471584 |
lm.fit |
0.320 |
0.0386941 |
lm |
0.255 |
0.0308343 |
%*% |
0.195 |
0.0235792 |
breakfactor |
0.195 |
0.0235792 |
residuals.breakpointsfull |
0.195 |
0.0235792 |
sctest |
0.190 |
0.0229746 |
pvalue.efp |
0.170 |
0.0205562 |
sctest.efp |
0.170 |
0.0205562 |
(TOTAL) |
2.115 |
1.0000000 |
bfast |
2.115 |
1.0000000 |
breakpoints |
1.935 |
0.9148936 |
breakpoints.breakpointsfull |
1.175 |
0.5555556 |
summary.breakpointsfull |
1.105 |
0.5224586 |
breakpoints.formula |
1.005 |
0.4751773 |
confint.breakpointsfull |
0.575 |
0.2718676 |
RSS |
0.325 |
0.1536643 |
lm |
0.315 |
0.1489362 |
breakfactor |
0.245 |
0.1158392 |
residuals.breakpointsfull |
0.240 |
0.1134752 |
as.character |
0.170 |
0.0803783 |
pargmaxV |
0.045 |
0.0212766 |
Function: bfast.reccusum
(TOTAL) |
7.925 |
1.0000000 |
bfast |
7.925 |
1.0000000 |
breakpoints |
7.685 |
0.9697161 |
breakpoints.formula |
6.990 |
0.8820189 |
recresid |
4.430 |
0.5589905 |
recresid.default |
4.415 |
0.5570978 |
extend.RSS.table |
2.415 |
0.3047319 |
as.vector |
1.065 |
0.1343849 |
outer |
0.935 |
0.1179811 |
breakpoints.breakpointsfull |
0.875 |
0.1104101 |
RSS |
0.855 |
0.1078864 |
summary.breakpointsfull |
0.840 |
0.1059937 |
confint.breakpointsfull |
0.455 |
0.0574132 |
as.character |
0.355 |
0.0447950 |
lm.fit |
0.260 |
0.0328076 |
lm |
0.235 |
0.0296530 |
residuals.breakpointsfull |
0.190 |
0.0239748 |
%*% |
0.180 |
0.0227129 |
breakfactor |
0.170 |
0.0214511 |
(TOTAL) |
1.980 |
1.0000000 |
bfast |
1.980 |
1.0000000 |
breakpoints |
1.805 |
0.9116162 |
breakpoints.breakpointsfull |
1.095 |
0.5530303 |
summary.breakpointsfull |
1.050 |
0.5303030 |
breakpoints.formula |
0.925 |
0.4671717 |
confint.breakpointsfull |
0.530 |
0.2676768 |
RSS |
0.310 |
0.1565657 |
lm |
0.280 |
0.1414141 |
residuals.breakpointsfull |
0.230 |
0.1161616 |
breakfactor |
0.220 |
0.1111111 |
as.character |
0.165 |
0.0833333 |
breakdates |
0.120 |
0.0606061 |
breakdates.breakpoints |
0.120 |
0.0606061 |
Function: bfast.recmosum
(TOTAL) |
7.945 |
1.0000000 |
bfast |
7.945 |
1.0000000 |
breakpoints |
7.700 |
0.9691630 |
breakpoints.formula |
6.995 |
0.8804279 |
recresid |
4.515 |
0.5682819 |
recresid.default |
4.485 |
0.5645060 |
extend.RSS.table |
2.340 |
0.2945249 |
as.vector |
1.075 |
0.1353052 |
breakpoints.breakpointsfull |
0.885 |
0.1113908 |
RSS |
0.865 |
0.1088735 |
summary.breakpointsfull |
0.845 |
0.1063562 |
outer |
0.825 |
0.1038389 |
confint.breakpointsfull |
0.460 |
0.0578980 |
as.character |
0.415 |
0.0522341 |
lm |
0.250 |
0.0314663 |
lm.fit |
0.225 |
0.0283197 |
%*% |
0.215 |
0.0270610 |
residuals.breakpointsfull |
0.180 |
0.0226558 |
breakfactor |
0.175 |
0.0220264 |
(TOTAL) |
2.125 |
1.0000000 |
bfast |
2.125 |
1.0000000 |
breakpoints |
1.905 |
0.8964706 |
breakpoints.breakpointsfull |
1.145 |
0.5388235 |
summary.breakpointsfull |
1.090 |
0.5129412 |
breakpoints.formula |
0.980 |
0.4611765 |
confint.breakpointsfull |
0.575 |
0.2705882 |
lm |
0.325 |
0.1529412 |
RSS |
0.275 |
0.1294118 |
residuals.breakpointsfull |
0.245 |
0.1152941 |
breakfactor |
0.230 |
0.1082353 |
as.character |
0.165 |
0.0776471 |
breakdates |
0.115 |
0.0541176 |
breakdates.breakpoints |
0.110 |
0.0517647 |
sctest |
0.045 |
0.0211765 |
Function: bfast01.test
(TOTAL) |
5.815 |
1.0000000 |
bfast01 |
5.815 |
1.0000000 |
Fstats |
4.100 |
0.7050731 |
lm.fit |
2.830 |
0.4866724 |
sctest |
0.830 |
0.1427343 |
as.matrix |
0.665 |
0.1143594 |
gefp |
0.400 |
0.0687876 |
lm |
0.325 |
0.0558899 |
model.matrix |
0.295 |
0.0507309 |
sctest.formula |
0.285 |
0.0490112 |
model.frame |
0.195 |
0.0335340 |
efp |
0.195 |
0.0335340 |
efp.formula |
0.195 |
0.0335340 |
bfastpp |
0.165 |
0.0283749 |
sctest.gefp |
0.140 |
0.0240757 |
as.character |
0.130 |
0.0223560 |
(TOTAL) |
5.975 |
1.0000000 |
bfast01 |
5.975 |
1.0000000 |
Fstats |
4.255 |
0.7121339 |
lm.fit |
2.905 |
0.4861925 |
sctest |
0.765 |
0.1280335 |
as.matrix |
0.685 |
0.1146444 |
gefp |
0.385 |
0.0644351 |
lm |
0.330 |
0.0552301 |
model.matrix |
0.325 |
0.0543933 |
sctest.formula |
0.245 |
0.0410042 |
model.frame |
0.225 |
0.0376569 |
efp |
0.185 |
0.0309623 |
efp.formula |
0.185 |
0.0309623 |
bfastpp |
0.145 |
0.0242678 |
sctest.gefp |
0.135 |
0.0225941 |
Function: bfastmonitor.hist.all
(TOTAL) |
3.105 |
1.0000000 |
bfastmonitor |
3.105 |
1.0000000 |
monitor |
0.770 |
0.2479871 |
mefp |
0.740 |
0.2383253 |
mefp.formula |
0.740 |
0.2383253 |
model.frame |
0.690 |
0.2222222 |
model.matrix |
0.595 |
0.1916264 |
efp |
0.595 |
0.1916264 |
efp.formula |
0.590 |
0.1900161 |
bfastpp |
0.505 |
0.1626409 |
lm |
0.415 |
0.1336554 |
monitor.matrix |
0.335 |
0.1078905 |
as.character |
0.160 |
0.0515298 |
factor |
0.145 |
0.0466989 |
lm.fit |
0.125 |
0.0402576 |
mefp.efp |
0.120 |
0.0386473 |
model.response |
0.075 |
0.0241546 |
(TOTAL) |
1.065 |
1.0000000 |
bfastmonitor |
1.060 |
0.9953052 |
monitor.matrix |
0.330 |
0.3098592 |
bfastpp |
0.290 |
0.2723005 |
mefp.matrix |
0.200 |
0.1877934 |
efp.matrix |
0.110 |
0.1032864 |
lm.fit |
0.090 |
0.0845070 |
mefp.efp |
0.065 |
0.0610329 |
as.matrix |
0.025 |
0.0234742 |
Function: bfastmonitor.hist.bp
(TOTAL) |
6.855 |
1.0000000 |
bfastmonitor |
6.855 |
1.0000000 |
history_break |
6.820 |
0.9948942 |
breakpoints |
6.820 |
0.9948942 |
breakpoints.formula |
6.790 |
0.9905179 |
recresid |
6.580 |
0.9598833 |
recresid.default |
6.530 |
0.9525894 |
as.vector |
1.560 |
0.2275711 |
outer |
1.235 |
0.1801605 |
%*% |
0.575 |
0.0838804 |
lm.fit |
0.385 |
0.0561634 |
extend.RSS.table |
0.155 |
0.0226112 |
(TOTAL) |
0.795 |
1.0000000 |
bfastmonitor |
0.795 |
1.0000000 |
history_break.matrix |
0.780 |
0.9811321 |
breakpoints.matrix |
0.755 |
0.9496855 |
breakpoints |
0.065 |
0.0817610 |
breakpoints.breakpointsfull |
0.065 |
0.0817610 |
summary.breakpointsfull |
0.055 |
0.0691824 |
Function: bfastmonitor.hist.roc
(TOTAL) |
6.765 |
1.0000000 |
bfastmonitor |
6.765 |
1.0000000 |
efp |
4.415 |
0.6526238 |
efp.formula |
4.410 |
0.6518847 |
history_roc |
4.005 |
0.5920177 |
history_roc.formula |
4.005 |
0.5920177 |
recresid |
3.400 |
0.5025868 |
recresid.default |
3.395 |
0.5018477 |
model.frame |
0.860 |
0.1271249 |
as.vector |
0.845 |
0.1249076 |
outer |
0.730 |
0.1079084 |
model.matrix |
0.660 |
0.0975610 |
mefp |
0.650 |
0.0960828 |
mefp.formula |
0.650 |
0.0960828 |
monitor |
0.605 |
0.0894309 |
bfastpp |
0.445 |
0.0657797 |
lm |
0.365 |
0.0539542 |
lm.fit |
0.285 |
0.0421286 |
%*% |
0.265 |
0.0391722 |
monitor.matrix |
0.230 |
0.0339985 |
as.character |
0.220 |
0.0325203 |
model.response |
0.155 |
0.0229120 |
(TOTAL) |
1.675 |
1.0000000 |
bfastmonitor |
1.675 |
1.0000000 |
efp.matrix |
0.675 |
0.4029851 |
history_roc.matrix |
0.670 |
0.4000000 |
recresid |
0.470 |
0.2805970 |
recresid.default |
0.465 |
0.2776119 |
monitor.matrix |
0.305 |
0.1820896 |
bfastpp |
0.240 |
0.1432836 |
mefp.matrix |
0.165 |
0.0985075 |
lm.fit |
0.110 |
0.0656716 |
mefp.efp |
0.070 |
0.0417910 |
ts |
0.050 |
0.0298507 |
sctest |
0.040 |
0.0238806 |
sctest.efp |
0.040 |
0.0238806 |
Function: bfastmonitor.ME
(TOTAL) |
7.670 |
1.0000000 |
bfastmonitor |
7.665 |
0.9993481 |
efp |
6.410 |
0.8357236 |
efp.formula |
6.410 |
0.8357236 |
mefp |
5.840 |
0.7614081 |
mefp.formula |
5.840 |
0.7614081 |
root.matrix.crossprod |
5.520 |
0.7196871 |
root.matrix |
3.270 |
0.4263364 |
root.matrix |
3.270 |
0.4263364 |
lm.fit |
0.905 |
0.1179922 |
monitor |
0.870 |
0.1134289 |
monitor.matrix |
0.815 |
0.1062581 |
history_roc |
0.620 |
0.0808344 |
history_roc.formula |
0.615 |
0.0801825 |
recresid |
0.535 |
0.0697523 |
recresid.default |
0.535 |
0.0697523 |
as.matrix |
0.290 |
0.0378096 |
(TOTAL) |
1.240 |
1.0000000 |
bfastmonitor |
1.240 |
1.0000000 |
efp.matrix |
0.615 |
0.4959677 |
mefp.matrix |
0.530 |
0.4274194 |
monitor.matrix |
0.505 |
0.4072581 |
root.matrix.crossprod |
0.330 |
0.2661290 |
history_roc.matrix |
0.105 |
0.0846774 |
recresid |
0.085 |
0.0685484 |
recresid.default |
0.080 |
0.0645161 |
lm.fit |
0.065 |
0.0524194 |
bfastpp |
0.045 |
0.0362903 |
Function: bfastmonitor.modis
(TOTAL) |
9.980 |
1.0000000 |
bfastmonitor |
7.040 |
0.7054108 |
efp |
4.415 |
0.4423848 |
efp.formula |
4.410 |
0.4418838 |
history_roc |
4.060 |
0.4068136 |
history_roc.formula |
4.060 |
0.4068136 |
recresid |
3.350 |
0.3356713 |
recresid.default |
3.350 |
0.3356713 |
bfastts |
2.365 |
0.2369739 |
as.vector |
1.005 |
0.1007014 |
model.frame |
0.840 |
0.0841683 |
outer |
0.795 |
0.0796593 |
as.ts |
0.720 |
0.0721443 |
model.matrix |
0.675 |
0.0676353 |
mefp |
0.655 |
0.0656313 |
mefp.formula |
0.655 |
0.0656313 |
monitor |
0.650 |
0.0651303 |
bfastpp |
0.575 |
0.0576152 |
factor |
0.515 |
0.0516032 |
as.character |
0.480 |
0.0480962 |
lm |
0.425 |
0.0425852 |
%*% |
0.375 |
0.0375752 |
monitor.matrix |
0.305 |
0.0305611 |
lm.fit |
0.295 |
0.0295591 |
(TOTAL) |
3.095 |
1.0000000 |
bfastmonitor |
1.760 |
0.5686591 |
bfastts |
0.770 |
0.2487884 |
history_roc.matrix |
0.715 |
0.2310178 |
efp.matrix |
0.675 |
0.2180937 |
recresid |
0.505 |
0.1631664 |
recresid.default |
0.505 |
0.1631664 |
monitor.matrix |
0.335 |
0.1082391 |
bfastpp |
0.215 |
0.0694669 |
mefp.matrix |
0.215 |
0.0694669 |
ts |
0.135 |
0.0436187 |
as.ts |
0.110 |
0.0355412 |
lm.fit |
0.095 |
0.0306947 |
mefp.efp |
0.090 |
0.0290792 |
sctest |
0.075 |
0.0242326 |
sctest.efp |
0.075 |
0.0242326 |
Function: bfastmonitor.olscusum
(TOTAL) |
6.775 |
1.0000000 |
bfastmonitor |
6.770 |
0.9992620 |
efp |
4.415 |
0.6516605 |
efp.formula |
4.415 |
0.6516605 |
history_roc |
4.055 |
0.5985240 |
history_roc.formula |
4.055 |
0.5985240 |
recresid |
3.330 |
0.4915129 |
recresid.default |
3.330 |
0.4915129 |
model.matrix |
0.930 |
0.1372694 |
model.frame |
0.900 |
0.1328413 |
outer |
0.820 |
0.1210332 |
as.vector |
0.810 |
0.1195572 |
monitor |
0.620 |
0.0915129 |
mefp |
0.615 |
0.0907749 |
mefp.formula |
0.610 |
0.0900369 |
bfastpp |
0.520 |
0.0767528 |
lm |
0.375 |
0.0553506 |
lm.fit |
0.305 |
0.0450185 |
%*% |
0.285 |
0.0420664 |
as.character |
0.220 |
0.0324723 |
factor |
0.145 |
0.0214022 |
(TOTAL) |
1.365 |
1.0000000 |
bfastmonitor |
1.365 |
1.0000000 |
history_roc.matrix |
0.670 |
0.4908425 |
efp.matrix |
0.620 |
0.4542125 |
recresid |
0.495 |
0.3626374 |
recresid.default |
0.490 |
0.3589744 |
bfastpp |
0.230 |
0.1684982 |
mefp.matrix |
0.210 |
0.1538462 |
mefp.efp |
0.120 |
0.0879121 |
lm.fit |
0.085 |
0.0622711 |
sctest |
0.075 |
0.0549451 |
sctest.efp |
0.075 |
0.0549451 |
monitor.matrix |
0.055 |
0.0402930 |
Function: bfastmonitor.RE
(TOTAL) |
5.010 |
1.0000000 |
bfastmonitor |
5.010 |
1.0000000 |
efp |
4.660 |
0.9301397 |
efp.formula |
4.660 |
0.9301397 |
mefp |
4.310 |
0.8602794 |
mefp.formula |
4.310 |
0.8602794 |
root.matrix.crossprod |
3.515 |
0.7015968 |
root.matrix |
2.135 |
0.4261477 |
root.matrix |
2.135 |
0.4261477 |
lm.fit |
0.790 |
0.1576846 |
history_roc |
0.385 |
0.0768463 |
history_roc.formula |
0.380 |
0.0758483 |
recresid |
0.340 |
0.0678643 |
recresid.default |
0.340 |
0.0678643 |
as.matrix |
0.195 |
0.0389222 |
monitor |
0.155 |
0.0309381 |
monitor.matrix |
0.130 |
0.0259481 |
(TOTAL) |
0.540 |
1.0000000 |
bfastmonitor |
0.535 |
0.9907407 |
efp.matrix |
0.395 |
0.7314815 |
mefp.matrix |
0.355 |
0.6574074 |
monitor.matrix |
0.095 |
0.1759259 |
lm.fit |
0.090 |
0.1666667 |
history_roc.matrix |
0.065 |
0.1203704 |
recresid |
0.045 |
0.0833333 |
recresid.default |
0.045 |
0.0833333 |
mefp.efp |
0.020 |
0.0370370 |