Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS iterator vs array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7 Mobile/15E148 Safari/604.1 Ddg/18.7
Browser:
Mobile Safari 18
Operating system:
iOS 18.7.1
Device Platform:
Mobile
Date tested:
5 months ago
Test name
Executions per second
Array
7567264.0 Ops/sec
Iterator
1684724.6 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const items = [1,2,3,4,5,6,7,8,9,10];
Tests:
Array
const arrayTransform = items.filter(i => i % 2 === 0).map(n => n * 2);
Iterator
const iterTransform = items.values().filter(i => i % 2 === 0).map(n => n * 2).toArray();