Apply Directly vs Apply Array

Benchmark created on


Setup

function test(a, b, c) {
        return a + b + c;
    }
    
    function applyDirect() {
        test.apply(void 0, arguments);
    }
    
    function applyArray() {
        test.apply(void 0, Array.prototype.slice.call(arguments));
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Apply Directly
applyDirect(1, 2, 3);
ready
Apply Array
applyArray(1, 2, 3);
ready

Revisions

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