Split vs no split

Benchmark created on


Preparation HTML

<script>
  var obj1 = {key: 'Card-101'};
  var obj2 = {type: 'Card', index: 101};
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Split
obj1.key.split('-')[0] === 'Card'
ready
No split
obj2.type === 'Card'
ready

Revisions

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