Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
stringify vs join vs string vs tostring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser:
Chrome 142
Operating system:
Windows
Device Platform:
Desktop
Date tested:
6 months ago
stringify
407/s
join
291/s
string
289/s
toString
263/s
View exact numbers
Test name
Executions per second
✓
stringify
407 Ops/sec
join
291 Ops/sec
string
289 Ops/sec
toString
263 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var arr = Array.from({ length: 10000 }).map((_, i) => [Math.random()*1000, Math.random()*1000]);
Tests:
stringify
arr.map(x => JSON.stringify(x))
join
arr.map(x => x.join(","))
string
arr.map(x => String(x))
toString
arr.map(x => x.toString())