jst-7

Benchmark created by Andy on


Setup

var codesArr = ['GB'];
  
  var codesObj = { GB: true };

Test runner

Ready to run.

Testing in
TestOps/sec
Array indexOf
// Something that is there.
codesArr.indexOf('GB');

// Something that isn't.
codesArr.indexOf('LOL');
ready
Boolean Coerce
// Something that is there.
Boolean(codesObj['GB']);

// Something that isn't.
Boolean(codesObj['LOL']);
ready

Revisions

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

  • Revision 1: published by Andy on
  • Revision 2: published by Taylor McKinney on