Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark results #7

Open
aretecode opened this issue Jun 20, 2017 · 0 comments
Open

benchmark results #7

aretecode opened this issue Jun 20, 2017 · 0 comments

Comments

@aretecode
Copy link

aretecode commented Jun 20, 2017

output from running benchmarks: (where are the numbers? how to best run them?)

 array-unique git:(master) ✗ node benchmark
#1: long
  filter:
  filter2:
  forIn:
  linearSearch01:
  setImmutable:
  set:
  whileHash:
  while:

  fastest is
#2: med
  filter:
  filter2:
  forIn:
  linearSearch01:
  setImmutable:
  set:
  whileHash:
  while:

  fastest is
#3: short
  filter:
  filter2:
  forIn:
  linearSearch01:
  setImmutable:
  set:
  whileHash:
  while:

  fastest is

added filter 2 which is:

module.exports = function(arr) {
  return arr.filter(function(value, index, arr) {
    return arr.indexOf(value) === index;
  });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant