Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
json stringify vs array join
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:145.0) Gecko/20100101 Firefox/145.0
Browser:
Firefox 145
Operating system:
Windows
Device Platform:
Desktop
Date tested:
8 months ago
join
14.5M/s
JSON.stringify
8.9M/s
View exact numbers
Test name
Executions per second
✓
join
14,469,866 Ops/sec
JSON.stringify
8,908,746 Ops/sec
Script Preparation code:
function moreData(arr, left) { if(left === 0) return arr; else { arr.push(Math.floor(Math.random() * 256)); return moreData(arr, left - 1); } } function makeTestData() { return moreData([], 4); }
Tests:
join
makeTestData().join('-')
JSON.stringify
JSON.stringify(makeTestData());