From 2456ec2a62c339dde849d343792d25a235a29175 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 8 Dec 2016 09:39:33 +0100 Subject: Static documentation articles rebuilt by pkgdown::build_articles() --- docs/articles/compiled_models.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'docs/articles/compiled_models.html') diff --git a/docs/articles/compiled_models.html b/docs/articles/compiled_models.html index 660af1d1..457f5a1d 100644 --- a/docs/articles/compiled_models.html +++ b/docs/articles/compiled_models.html @@ -99,21 +99,21 @@ mb.1 <- micr print(mb.1)
## Unit: milliseconds
 ##                   expr       min        lq      mean    median        uq
-##  deSolve, not compiled 5006.3815 5014.4629 5112.7115 5022.5443 5165.8765
-##       Eigenvalue based  840.3027  874.3549  892.0593  908.4071  917.9376
-##      deSolve, compiled  706.9909  712.8031  723.4380  718.6154  731.6615
+##  deSolve, not compiled 5185.0893 5231.5690 5266.8769 5278.0487 5307.7706
+##       Eigenvalue based  843.3153  847.1503  876.5398  850.9853  893.1520
+##      deSolve, compiled  723.0636  740.5682  755.9995  758.0729  772.4674
 ##        max neval cld
-##  5309.2087     3   b
-##   927.4680     3  a 
-##   744.7077     3  a
+## 5337.4926 3 b +## 935.3187 3 a +## 786.8620 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:

rownames(smb.1) <- smb.1$expr
 smb.1["median"]/smb.1["deSolve, compiled", "median"]
##                         median
-## deSolve, not compiled 6.989197
-## Eigenvalue based      1.264108
+## deSolve, not compiled 6.962456
+## Eigenvalue based      1.122564
 ## deSolve, compiled     1.000000
@@ -134,19 +134,19 @@ smb.1["median"]/smb
smb.2 <- summary(mb.2)
 print(mb.2)
## Unit: seconds
-##                   expr       min       lq     mean    median        uq
-##  deSolve, not compiled 11.015990 11.17783 11.24827 11.339674 11.364403
-##      deSolve, compiled  1.285264  1.29794  1.32988  1.310616  1.352189
+##                   expr       min        lq      mean   median        uq
+##  deSolve, not compiled 10.963655 10.992677 11.033360 11.02170 11.068212
+##      deSolve, compiled  1.287898  1.309754  1.322972  1.33161  1.340509
 ##        max neval cld
-##  11.389132     3   b
-##   1.393762     3  a
+## 11.114726 3 b +## 1.349408 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.7 using the version of the differential equation model compiled from C code!

+

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

This vignette was built with mkin 0.9.45 on

## R version 3.3.2 (2016-10-31)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
-- 
cgit v1.2.1