Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
int to string convertation
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/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
String
283020.8 Ops/sec
toString(10)
291139.2 Ops/sec
toString
275877.9 Ops/sec
interpolation
282857.3 Ops/sec
plus
280893.7 Ops/sec
Tests:
String
const arr = Array(1000).map(() => ~~(Math.random() * 1000)) const b = arr.map((num) => String(num))
toString(10)
const arr = Array(1000).map(() => ~~(Math.random() * 1000)) const b = arr.map((num) => num.toString(10))
toString
const arr = Array(1000).map(() => ~~(Math.random() * 1000)) const b = arr.map((num) => num.toString())
interpolation
const arr = Array(1000).map(() => ~~(Math.random() * 1000)) const b = arr.map((num) => `${num}`)
plus
const arr = Array(1000).map(() => ~~(Math.random() * 1000)) const b = arr.map((num) => '' + num)