Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
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
Test name
Executions per second
spread
1420509.9 Ops/sec
for
1520861.2 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]); }