prototypal vs functional

Benchmark created on


Preparation HTML

<script>
  function test(a, b) {
   return a + b;
  }
  Number.prototype.test(b) {
   return this + b;
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
functional
test(3, 7)
ready
prototypal
3.test(7)
ready

Revisions

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