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\RtmpOs7TyE\filef3c84b85785a.R" Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 812.0 812.0 812.000 812.0 812.0 812.0 1 subsequent 9.3 9.5 9.809 9.5 9.6 30.9 100 > source(FILE.R, chdir = FALSE) Loading required namespace: microbenchmark Unit: microseconds expr min lq mean median uq max neval first time 597.5 597.5 597.500 597.5 597.5 597.5 1 subsequent 11.0 11.1 11.471 11.2 11.3 34.1 100 > source(FILE.R, chdir = TRUE) Unit: microseconds expr min lq mean median uq max neval first time 549 549.0 549.000 549.0 549.0 549.0 1 subsequent 11 11.1 11.393 11.2 11.3 27.9 100 > > proc.time() user system elapsed 0.29 0.04 0.65