Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Slice vs Pop vs At(-1)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Linux
Device Platform:
Desktop
Date tested:
27 days ago
At(-1)
197.8M/s
Pop
23.1M/s
Slice
3.5M/s
View exact numbers
Test name
Executions per second
✓
At(-1)
197,805,504 Ops/sec
Pop
23,068,406 Ops/sec
Slice
3,502,144 Ops/sec
Script Preparation code:
var arr = [1, 3, 5, 11, 13, 123, 123 ,32, 123, 23213, 2323, 2313, 545];
Tests:
Slice
arr.slice(0, -1);
Pop
arr.pop();
At(-1)
arr.at(-1)