Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
String() vs Empty String
(version: 1)
Comparing performance of:
String() vs Empty String
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
String()
let num = 500; let nums = []; for(let i = 0; i < 100; ++i) { nums.push(String(num)); }
Empty String
let num = 500; let nums = []; for(let i = 0; i < 100; ++i) { nums.push(num + ''); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
String()
Empty String
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Empty String
3.3M/s
String()
979K/s
View exact numbers
Test name
Executions per second
✓
Empty String
3,348,355 Ops/sec
String()
978,983 Ops/sec
Related benchmarks
String() vs .toString()
test const vs let
+"" vs .toString()
String() vs .toString() vs adding empty string
Comments
Confirm delete:
Do you really want to delete benchmark?