Direct function execution or using "call"

Benchmark created on


Setup

function method1(test) {
  return test;
}
function method2() {
  return this;
}
const AnotherObject = {};

Test runner

Ready to run.

Testing in
TestOps/sec
Direct execution
method1(AnotherObject);
ready
Using call
method2.call(AnotherObject);
ready

Revisions

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