R Under development (unstable) (2024-12-15 r87442 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > local({ + FILE.R <- tempfile(fileext = ".R") + on.exit(unlink(FILE.R), add = TRUE) + this.path:::.writeCode(file = FILE.R, { + if (requireNamespace("microbenchmark", quietly = TRUE)) { + print(this.path:::.faster_subsequent_times_test()) + } else cat("\n'package:microbenchmark' is not available :(\n") + }) + cat("\n") + this.path:::.Rscript(c("--default-packages=NULL", "--vanilla", FILE.R)) + + + cat("\n> source(FILE.R, chdir = FALSE)\n") + source(FILE.R, chdir = FALSE) + + + cat("\n> source(FILE.R, chdir = TRUE)\n") + source(FILE.R, chdir = TRUE) + }) "D:/RCompile/recent/R/bin/x64/Rscript.exe" "--default-packages=NULL" "--vanilla" "D:\temp\2024_12_18_01_25_17_6972\Rtmp0gGbN8\file319d049fd27b8.R" Unit: microseconds expr min lq mean median uq max neval first time 1389.6 1389.60 1389.600 1389.6 1389.6 1389.6 1 subsequent 16.1 19.35 21.689 19.8 20.2 181.1 100 > source(FILE.R, chdir = FALSE) Unit: microseconds expr min lq mean median uq max neval first time 726.3 726.3 726.300 726.3 726.3 726.3 1 subsequent 20.9 22.1 22.627 22.4 22.7 43.5 100 > source(FILE.R, chdir = TRUE) Unit: microseconds expr min lq mean median uq max neval first time 392.8 392.8 392.800 392.8 392.8 392.8 1 subsequent 11.1 11.2 11.662 11.2 11.3 46.7 100 > > proc.time() user system elapsed 0.37 0.01 0.70