Skip to content

remove.dups in strech() suffers from performance issue #180

Description

@psychelzh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions