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
Go 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
Symbol
182.1M/s
Number
167.8M/s
String
155.7M/s
View exact numbers
Test name
Executions per second
✓
Symbol
182,111,392 Ops/sec
Number
167,750,016 Ops/sec
String
155,739,776 Ops/sec
Related benchmarks
string vs number 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?