R Under development (unstable) (2024-09-21 r87186 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. > library(supc) > supc:::.set_num_threads(2) > set.seed(1) > x <- matrix(0, 20, 20) > x[] <- rnorm(length(x)) > system.time(d1 <- supc:::.test.dist(x)) user system elapsed 0 0 0 > system.time(d2 <- stats::dist(x)) user system elapsed 0 0 0 > max(abs(d1 - d2)) < sqrt(.Machine$double.eps) [1] TRUE > > > x <- matrix(0, 200, 2000) > x[] <- rnorm(length(x)) > system.time(d1 <- supc:::.test.dist(x)) user system elapsed 0.25 0.00 0.13 > system.time(d2 <- stats::dist(x)) user system elapsed 0.15 0.00 0.16 > max(abs(d1 - d2)) < sqrt(.Machine$double.eps) [1] TRUE > > > proc.time() user system elapsed 0.79 0.07 0.73