Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS join vs map
Compare JS join and map methods.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Mobile/15E148 Safari/604.1
Browser:
Mobile Safari 18
Operating system:
iOS 18.1
Device Platform:
Mobile
Date tested:
5 months ago
Test name
Executions per second
map
1517.4 Ops/sec
join
706.8 Ops/sec
Script Preparation code:
var array = []; for (let i = 0; i < 100000; i++) { array.push(`item-${i}`); }
Tests:
map
const arrayString = array.map((item, i) => [i > 0 && ", ", item]);
join
const arrayString = array.join(', ');