R Under development (unstable) (2024-02-15 r85925 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")) { + 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\Rtmp6NfQuv\filea8902e1c22c2.R" Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 1774.4 1774.4 1774.400 1774.4 1774.4 1774.4 1 subsequent 15.5 16.2 17.144 16.4 16.9 69.1 100 > source(FILE.R, chdir = FALSE) Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 866.6 866.6 866.600 866.6 866.6 866.6 1 subsequent 16.9 18.1 18.759 18.2 18.4 66.1 100 > source(FILE.R, chdir = TRUE) Unit: microseconds expr min lq mean median uq max neval first time 628.3 628.3 628.300 628.30 628.3 628.3 1 subsequent 17.2 18.1 19.721 19.15 20.1 64.9 100 > > proc.time() user system elapsed 0.39 0.12 0.93