Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array.prototype.join vs JSON.stringify
(version: 0)
Array.prototype.join vs JSON.stringify
Comparing performance of:
JSON.stringify vs Array.prototype.join
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var elements = []; for (let i=32; i<10000; i++){ elements.push(`${i}-${String.fromCharCode(i)}`); }
Tests:
JSON.stringify
const output = JSON.stringify(elements);
Array.prototype.join
const output = elements.join();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
JSON.stringify
Array.prototype.join
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser/OS:
Chrome 135 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
JSON.stringify
6410.8 Ops/sec
Array.prototype.join
7825.1 Ops/sec
Related benchmarks:
JSON.strigify vs array.join
JSON.stringify array vs join Updated
JSON Stringify Speed Test vs joining array
JSON stringify long array with ids
Comments
Confirm delete:
Do you really want to delete benchmark?