Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Symbol vs String property square bracket vs dot notation
(version: 1)
Comparing performance of:
Symbol vs String vs dot notation
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
var foo = {}; var sym = Symbol("key"); var str = "key";
Tests:
Symbol
foo[sym] = 1;
String
foo[str] = 1;
dot notation
foo.key = 1
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Symbol
String
dot notation
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/135.0.0.0 Safari/537.36
Browser/OS:
Chrome 135 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Symbol
198.7M/s
dot notation
197.9M/s
String
192.6M/s
View exact numbers
Test name
Executions per second
✓
Symbol
198,677,248 Ops/sec
dot notation
197,940,496 Ops/sec
String
192,578,016 Ops/sec
Related benchmarks
Symbol vs String property square bracket
Symbol vs String property square brackettt
Comments
Confirm delete:
Do you really want to delete benchmark?