Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
stringify vs join vs tostring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0
Browser:
Chrome 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
stringify
18.9 Ops/sec
join
44.2 Ops/sec
toString
39.3 Ops/sec
Script Preparation code:
var arr_small = Array.from({ length: 1000 }).map((_, i) => `test_val${i}`); var arr_big = Array.from({ length: 1000000 }).map((_, i) => `test_val${i}`);
Tests:
stringify
JSON.stringify(arr_small); JSON.stringify(arr_big);
join
arr_small.join(''); arr_big.join('');
toString
arr_small.toString(); arr_big.toString();