Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Sequencial access
(version: 0)
Comparing performance of:
pop vs shift vs i
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const arr = Array.from({length: 100})
Tests:
pop
let a = 0 while (arr.length) { a = arr.pop() }
shift
let a = 0 while (arr.length) { a = arr.shift() }
i
let a = 0 let i = 0 while (i < arr.length) { a = arr[i] i++ }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
pop
shift
i
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?