Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
String() vs .toString() vs template string
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Browser:
Firefox 141
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
.toString()
4.6M/s
String()
4.5M/s
template string
3.2M/s
View exact numbers
Test name
Executions per second
✓
.toString()
4,585,969 Ops/sec
String()
4,478,358 Ops/sec
template string
3,156,666 Ops/sec
Tests:
String()
let nums = []; for(let i = 0; i < 100; ++i) { nums.push(String(i)); }
.toString()
let nums = []; for(let i = 0; i < 100; ++i) { nums.push(i.toString()); }
template string
let nums = []; for(let i = 0; i < 100; ++i) { nums.push(`${i}`); }