Skip to content

R.uniq is slower than Ramda for big arrays #581

@bovine3dom

Description

@bovine3dom

Minimal example:

// Make an array of 10,000 strings with some repetition
let strings = R.map(() => Math.floor(Math.random() * 1000) + "", R.range(0,10000))

// Time R.uniq
const t0 = new Date().getTime()
R.uniq(strings)
const t1 = new Date().getTime()

// Store the result
const result = t1-t0
console.log(t1 - t0)
  • in Ramda: ~1ms
  • in Rambda: ~600ms

Related downstream issue: tridactyl/tridactyl#3772

: )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions