eshwar-set-vs-array

JavaScript performance comparison

Test case created by Eshwar Prasad Yaddanapudi

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Array_in_set
const ary = new Set([]);

ary.add('eshwar');

ary.add('yes');

ary.add('prasad');


ary.delete('yes');
pending…
normal_ary
const a = [];
a.push('eshwar');
a.push('yes');
a.push('prasad');

if(a.indexOf('yes')!== -1) {
a.splice(a.indexOf('yes'),1);
}
pending…

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

0 Comments