Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Integer vs toString
(version: 0)
Comparing performance of:
Integer vs toString
Created:
3 years ago
by:
Guest
Jump to the latest result
Tests:
Integer
let components = [100, 100]; let nums = {}; for(let i = 0; i < 100; ++i) { let x = components[0]; let y = components[1]; nums[(x + y) * (x + y + 1) / 2 + y] = true; }
toString
let components = [100, 100]; let nums = {}; for(let i = 0; i < 100; ++i) { nums[components.toString()] = true; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Integer
toString
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Intl.NumberFormat vs toLocalString
String to int vs int to string 2
parseInt vs toString vs string literal vs + empty string vs String constructor
String to number, parseInt, +, or * 1
Number.isInteger() vs typeof
Comments
Confirm delete:
Do you really want to delete benchmark?