slice vs length vs pop - 1 (v3)

Revision 3 of this benchmark created by Siarhei on


Setup

var x = [1,2,3,4,54,1,2,,6,457,4,53,52,34,2,34,45,357,6325,3,5532,423,43,5325,42,542,6,3256,78,569,87,43,2,342,34,6,23,24,'1243']

Test runner

Ready to run.

Testing in
TestOps/sec
slice
var y = x.slice(-1)
ready
length - 1
var y = x[x.length - 1]
ready
pop
var y = x.pop();
ready

Revisions

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