array.at(index) (v2)

Revision 2 of this benchmark created on


Setup

let dataArr = new Array(20).fill('test-string ');
let testlength = 200;

Test runner

Ready to run.

Testing in
TestOps/sec
indexable[index]
for (let count = 0; count < testlength; count++) {
dataArr[dataArr.length-1];
}
ready
indexable.at(index)
for (let count = 0; count < testlength; count++) {
dataArr.at(-1);
}
ready

Revisions

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