Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
spread for test
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0
Browser:
Firefox 120
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
for
1.5M/s
spread
1.4M/s
View exact numbers
Test name
Executions per second
✓
for
1,520,861 Ops/sec
spread
1,420,510 Ops/sec
Script Preparation code:
var a1 = ["2023-12-13 14:00:00", "2023-12-13 14:01:00", "2023-12-13 14:02:00"]; var a2 = ["2023-12-13 14:02:00", "2023-12-13 14:03:00", "2023-12-13 14:04:00"];
Tests:
spread
const set = new Set([...a1, ...a2]);
for
const set = new Set(); for (let i = 0; i < a1.length; ++i) { set.add(a1[i]); } for (let i = 0; i < a2.length; ++i) { set.add(a2[i]); }