Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
toString vs Stringify vs backticks
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
toString
5670267.0 Ops/sec
stringify
2472513.0 Ops/sec
backticks
2134426.2 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:
toString
makeTestData().toString()
stringify
JSON.stringify(makeTestData());
backticks
`${Object.values(makeTestData())}`