Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
string vs number vs symbol (isolated from symbol creation logic)
(version: 1)
Comparing performance of:
Symbol vs Number vs String
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const a = Symbol(); const b = Symbol(); const c = 1; const d = 2; const e = '1'; const f = '2';
Tests:
Symbol
a === b
Number
c === d
String
e === f
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Symbol
Number
String
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser/OS:
Chrome 136 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Symbol
182111392.0 Ops/sec
Number
167750016.0 Ops/sec
String
155739776.0 Ops/sec
Related benchmarks:
Testing Var vs No Var
If/Else vs Ternary
string vs number vs symbol
Short undef check
func vs object vs symbol
string vs number vs symbol 2
Function vs () =>
sdjfkpweiufjq
string/number/symbol speed test
Comments
Confirm delete:
Do you really want to delete benchmark?