Destructuring vs index access

Benchmark created on


Setup

var array = [1,2];

Test runner

Ready to run.

Testing in
TestOps/sec
destructure
var [one, two] = array;
ready
index reading
var one = array[0];
var two = array[1];
ready

Revisions

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