Test array element removal

Benchmark created on


Setup

a = [...Array(1000).keys()].map((key) => ({x:key+1}))

Test runner

Ready to run.

Testing in
TestOps/sec
Assign (can't be const)
a = []
ready
Splice
a.splice(0, a.length)
ready
Length (ick)
a.length = 0
ready
Pop
while (a.length) { a.pop() }
ready

Revisions

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