From 373d98038c514c5152478127a8a2b9b390ee1b58 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sun, 14 Jan 2018 18:37:07 +0100 Subject: Load mkin quietly in vignettes Static documentation articles rebuilt by pkgdown::build_articles() --- vignettes/compiled_models.html | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'vignettes/compiled_models.html') diff --git a/vignettes/compiled_models.html b/vignettes/compiled_models.html index 30f29699..8aaa70d6 100644 --- a/vignettes/compiled_models.html +++ b/vignettes/compiled_models.html @@ -12,7 +12,7 @@ - + Performance benefit by using compiled model definitions in mkin @@ -70,7 +70,7 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf

Performance benefit by using compiled model definitions in mkin

Johannes Ranke

-

2017-07-21

+

2018-01-14

@@ -81,13 +81,8 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
##            gcc 
 ## "/usr/bin/gcc"

First, we build a simple degradation model for a parent compound with one metabolite.

-
library("mkin")
-
## Loading required package: minpack.lm
-
## Loading required package: rootSolve
-
## Loading required package: inline
-
## Loading required package: methods
-
## Loading required package: parallel
-
SFO_SFO <- mkinmod(
+
library("mkin", quietly = TRUE)
+SFO_SFO <- mkinmod(
   parent = mkinsub("SFO", "m1"),
   m1 = mkinsub("SFO"))
## Successfully compiled differential equation model from auto-generated C code.
@@ -110,9 +105,9 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf }
## Loading required package: rbenchmark
##                    test replications elapsed relative user.self sys.self
-## 3     deSolve, compiled            3   2.140    1.000     2.140        0
-## 1 deSolve, not compiled            3  15.070    7.042    15.068        0
-## 2      Eigenvalue based            3   2.577    1.204     2.576        0
+## 3     deSolve, compiled            3   2.005    1.000     2.000    0.004
+## 1 deSolve, not compiled            3  14.202    7.083    14.196    0.000
+## 2      Eigenvalue based            3   2.427    1.210     2.428    0.000
 ##   user.child sys.child
 ## 3          0         0
 ## 1          0         0
@@ -140,14 +135,14 @@ code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Inf
 }
## Successfully compiled differential equation model from auto-generated C code.
##                    test replications elapsed relative user.self sys.self
-## 2     deSolve, compiled            3   3.646    1.000     3.644        0
-## 1 deSolve, not compiled            3  30.752    8.434    30.752        0
+## 2     deSolve, compiled            3   3.489    1.000     3.488        0
+## 1 deSolve, not compiled            3  28.906    8.285    28.904        0
 ##   user.child sys.child
 ## 2          0         0
 ## 1          0         0

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

-

This vignette was built with mkin 0.9.45.2 on

-
## R version 3.4.1 (2017-06-30)
+

This vignette was built with mkin 0.9.47.1 on

+
## R version 3.4.3 (2017-11-30)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
 ## Running under: Debian GNU/Linux 9 (stretch)
## CPU model: Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz
-- cgit v1.2.1