Reproducible example
When add remove.dups = TRUE, stretch() costs too much time:
x <- matrix(rnorm(100 * 206), nrow = 100) |> as.data.frame()
cors <- corrr::correlate(x, quiet = TRUE)
system.time(corrr::stretch(cors))
#> user system elapsed
#> 0.02 0.00 0.08
system.time(corrr::stretch(cors, remove.dups = TRUE))
#> user system elapsed
#> 1.79 0.19 6.72
Created on 2024-09-13 with reprex v2.1.0