R Under development (unstable) (2024-06-28 r86850 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\RtmpkTK4hj\filed95034185531.R" Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 796.601 796.601 796.60100 796.601 796.601 796.601 1 subsequent 9.301 9.401 9.71502 9.501 9.601 24.301 100 > source(FILE.R, chdir = FALSE) Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 629.7 629.7 629.70000 629.700 629.700 629.700 1 subsequent 10.9 11.1 11.45999 11.101 11.201 39.401 100 > source(FILE.R, chdir = TRUE) Unit: microseconds expr min lq mean median uq max neval first time 573.600 573.6 573.60000 573.600 573.600 573.600 1 subsequent 10.901 11.1 11.35001 11.101 11.201 28.101 100 > > proc.time() user system elapsed 0.28 0.06 0.65