From 1c81442284a25a9cf4979d9236ec0c1a1cf8a8dd Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 22 Oct 2016 17:55:12 +0200 Subject: Update way to specify encoding, improve FOCUS_L TOC --- vignettes/compiled_models.html | 50 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'vignettes/compiled_models.html') diff --git a/vignettes/compiled_models.html b/vignettes/compiled_models.html index 7a9537c7..c941f6ae 100644 --- a/vignettes/compiled_models.html +++ b/vignettes/compiled_models.html @@ -11,19 +11,19 @@ - + Performance benefit by using compiled model definitions in mkin - - - - + + + + @@ -98,6 +98,7 @@ button.code-folding-btn:focus { +
@@ -215,7 +216,7 @@ div.tocify {

Performance benefit by using compiled model definitions in mkin

Johannes Ranke

-

2016-09-28

+

2016-10-22

@@ -256,21 +257,21 @@ mb.1 <- microbenchmark( print(mb.1)
## Unit: milliseconds
 ##                   expr       min        lq      mean    median        uq
-##  deSolve, not compiled 5191.7067 5234.0766 5254.1638 5276.4465 5285.3923
-##       Eigenvalue based  837.7118  839.5009  848.7273  841.2900  854.2351
-##      deSolve, compiled  725.9412  738.4609  776.5436  750.9807  801.8448
+##  deSolve, not compiled 5099.8455 5110.8441 5119.1894 5121.8427 5128.8613
+##       Eigenvalue based  845.6937  847.1686  861.2028  848.6434  868.9574
+##      deSolve, compiled  701.8677  704.0306  705.7280  706.1935  707.6581
 ##        max neval cld
-##  5294.3381     3   b
-##   867.1802     3  a 
-##   852.7088     3  a
+## 5135.8800 3 c +## 889.2714 3 b +## 709.1228 3 a
autoplot(mb.1)
-

-

We see that using the compiled model is by a factor of 7 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 7.3 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 7.026075
-## Eigenvalue based      1.120255
+## deSolve, not compiled 7.252747
+## Eigenvalue based      1.201715
 ## deSolve, compiled     1.000000
@@ -291,20 +292,20 @@ 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 10.977718 11.003379 11.044286 11.02904 11.077570
-##      deSolve, compiled  1.289028  1.296324  1.332644  1.30362  1.354451
+##                   expr       min        lq      mean    median        uq
+##  deSolve, not compiled 10.850714 10.861070 10.893285 10.871427 10.914570
+##      deSolve, compiled  1.278907  1.285111  1.300237  1.291314  1.310902
 ##        max neval cld
-##  11.126100     3   b
-##   1.405282     3  a
+## 10.957713 3 b +## 1.330489 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 8.5 using the version of the differential equation model compiled from C code!

-

This vignette was built with mkin 0.9.44.9000 on

+

+

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

+

This vignette was built with mkin 0.9.44 on

## R version 3.3.1 (2016-06-21)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
 ## Running under: Debian GNU/Linux 8 (jessie)
@@ -325,6 +326,7 @@ $(document).ready(function () { $('tr.header').parent('thead').parent('table').addClass('table table-condensed'); }); + -- cgit v1.2.1