Function apply() method vs Function call() method

Benchmark created on


Setup

function sum(a, b){
	return a + b
}

Test runner

Ready to run.

Testing in
TestOps/sec
Using the function apply() method
sum.apply(null, [20, 30])
ready
Using the function call() method
sum.call(null, 20, 30)
ready

Revisions

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