The Wayback Machine - https://web.archive.org/web/20220715211540/https://github.com/topics/sets
Skip to content
#

sets

Here are 250 public repositories matching this topic...

RaphaelS1
RaphaelS1 commented Dec 4, 2019
x = sample(1000)
y = sample(1000)

sx = Set$new(x)
sy = Set$new(y)

microbenchmark::microbenchmark(
  setdiff(x, y),
  sx - sy,
  unit = "s"
)

Gives a mean time in seconds of:

setdiff(x,y) = 4.681405e-05
sx - sy = 1.639163e-02

A considerable difference. The additional bloat is due to a lot of checks that sort through the correct dispatch methods and use tricks for

enhancement good first issue

Improve this page

Add a description, image, and links to the sets topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the sets topic, visit your repo's landing page and select "manage topics."

Learn more