From f35e0b3d3b9f41bee2f5cc357afcb69e3aadad15 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 8 Jul 2022 17:39:44 +0200 Subject: Store DLL info in mkinmod objects for performance Thanks to Tomas Kalibera for his analysis of the problem on the r-package-devel mailing list and for the suggestion on how to fix it. See the current benchmark vignette for the new data on mkin 1.1.1 with R 4.2.1, with unprecedented performance. --- R/mkinmod.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'R/mkinmod.R') diff --git a/R/mkinmod.R b/R/mkinmod.R index 071f9e0e..d8740aed 100644 --- a/R/mkinmod.R +++ b/R/mkinmod.R @@ -464,9 +464,9 @@ mkinmod <- function(..., use_of_ff = "max", name = NULL, if (!inherits(model$cf, "try-error")) { if (is.null(dll_dir)) { if (!quiet) message("Temporary DLL for differentials generated and loaded") - dll_info <- inline::getDynLib(model$cf) + model$dll_info <- inline::getDynLib(model$cf) } else { - dll_info <- inline::moveDLL(model$cf, name, dll_dir, + model$dll_info <- inline::moveDLL(model$cf, name, dll_dir, unload = unload, overwrite = overwrite, verbose = !quiet) } } -- cgit v1.2.1