From a350a16bb2c11986faf5883a2804d46b03bd7c8f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 10 Sep 2016 05:21:52 +0200 Subject: Static documentation rebuilt with current staticdocs Using hadley/staticdocs commit #8c1069d from 8 days ago --- inst/web/vignettes/compiled_models.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'inst/web/vignettes/compiled_models.html') diff --git a/inst/web/vignettes/compiled_models.html b/inst/web/vignettes/compiled_models.html index 004a808c..212b1abb 100644 --- a/inst/web/vignettes/compiled_models.html +++ b/inst/web/vignettes/compiled_models.html @@ -251,21 +251,21 @@ mb.1 <- microbenchmark( print(mb.1)
## Unit: milliseconds
 ##                   expr       min        lq      mean    median        uq
-##  deSolve, not compiled 6507.8296 6549.5160 6597.4319 6591.2024 6642.2330
-##       Eigenvalue based  890.5249  917.6589  928.4907  944.7928  947.4735
-##      deSolve, compiled  735.4908  742.0363  749.3996  748.5817  756.3540
+##  deSolve, not compiled 6410.2240 6437.0229 6461.3866 6463.8218 6486.9680
+##       Eigenvalue based  887.5697  915.3026  929.6279  943.0355  950.6570
+##      deSolve, compiled  737.4060  745.6645  749.1956  753.9229  755.0903
 ##        max neval cld
-##  6693.2636     3   c
-##   950.1543     3  b 
-##   764.1264     3 a
+## 6510.1142 3 c +## 958.2786 3 b +## 756.2578 3 a
autoplot(mb.1)
-

-

We see that using the compiled model is by a factor of 8.8 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs:

+

+

We see that using the compiled model is by a factor of 8.6 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs:

rownames(smb.1) <- smb.1$expr
 smb.1["median"]/smb.1["deSolve, compiled", "median"]
##                         median
-## deSolve, not compiled 8.804921
-## Eigenvalue based      1.262110
+## deSolve, not compiled 8.573584
+## Eigenvalue based      1.250838
 ## deSolve, compiled     1.000000
@@ -286,18 +286,18 @@ smb.1["median"]/smb.1["deSolve, compiled", "median"
smb.2 <- summary(mb.2)
 print(mb.2)
## Unit: seconds
-##                   expr       min       lq      mean    median        uq
-##  deSolve, not compiled 13.741831 13.74759 13.815509 13.753350 13.852348
-##      deSolve, compiled  1.358402  1.35862  1.368666  1.358838  1.373798
+##                   expr       min        lq      mean    median       uq
+##  deSolve, not compiled 13.370040 13.424534 13.501075 13.479027 13.56659
+##      deSolve, compiled  1.336599  1.336707  1.339399  1.336815  1.34080
 ##        max neval cld
-##  13.951345     3   b
-##   1.388759     3  a
+## 13.654158 3 b +## 1.344784 3 a
smb.2["median"]/smb.2["deSolve, compiled", "median"]
##   median
 ## 1     NA
 ## 2     NA
autoplot(mb.2)
-

+

Here we get a performance benefit of a factor of 10.1 using the version of the differential equation model compiled from C code!

This vignette was built with mkin 0.9.44.9000 on

## R version 3.3.1 (2016-06-21)
-- 
cgit v1.2.1