`.length` performance

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
.length
const arr = new Array(10_000_000).fill('');

for (let i = 0; i < arr.length;i++){}
ready
a number
const arr = new Array(10_000_000).fill('');

const len = arr.length;

for (let i = 0; i < len;i++){}
ready

Revisions

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