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\RtmpySPMmy\file36b423b08fb.R" Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 1043.802 1043.802 1043.80200 1043.802 1043.8020 1043.802 1 subsequent 9.300 9.401 9.80899 9.501 9.6005 33.201 100 > source(FILE.R, chdir = FALSE) Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 878.301 878.301 878.30100 878.301 878.301 878.301 1 subsequent 10.901 11.001 11.40998 11.101 11.200 37.801 100 > source(FILE.R, chdir = TRUE) Unit: microseconds expr min lq mean median uq max neval first time 573.702 573.702 573.70200 573.702 573.702 573.702 1 subsequent 10.900 11.101 11.57696 11.201 11.301 41.401 100 > > proc.time() user system elapsed 0.34 0.01 0.68