admnifqhrianfkjasnlkns

Benchmark created by porrungroj on


Setup

<script>

        Benchmark.prototype.setup = function() {

            const length = 10000;
  const array = [...Array(length).keys()];
  //const array = _.shuffle([...Array(length).keys()]);
  const set = new Set(array);
  
        
  };

Test runner

Ready to run.

Testing in
TestOps/sec
s
for (let i = 0; i < length; i++) set.has(i);
ready
a
for (let i = 0; i < length; i++) array.includes(i);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by porrungroj on