Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
How to clear an array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Browser:
Chrome 141
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one month ago
MmzHrrdb
1/s
MmzHrrdb
1/s
MmzHrrdb
1/s
MmzHrrdb
1/s
(select 198766*667891)
1/s
MmzHrrdb
1/s
View exact numbers
Test name
Executions per second
✓
MmzHrrdb
1 Ops/sec
✓
MmzHrrdb
1 Ops/sec
✓
MmzHrrdb
1 Ops/sec
✓
MmzHrrdb
1 Ops/sec
✓
(select 198766*667891)
1 Ops/sec
✓
MmzHrrdb
1 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const array = Array.from({ length: 10000 }, () => Math.random());
Tests:
while pop
const arr = array.slice(); while (arr.length > 0) arr.pop();
while shift
const arr = array.slice(); while (arr.length > 0) arr.shift();
for pop
const arr = array.slice(); const length = arr.length; for (let i = 0; i < length; i++) arr.pop();
for shift
const arr = array.slice(); const length = arr.length; for (let i = 0; i < length; i++) arr.shift();
splice
const arr = array.slice(); arr.splice(0);
set length
const arr = array.slice(); arr.length = 0;