Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114
Ubuntu
Desktop
one year ago
Test name Executions per second
Property 99961976.0 Ops/sec
Symbol 94740024.0 Ops/sec
Script Preparation code:
x
 
class Propertied {
    constructor() {
        this.key = 1;
    }
}
window.Propertied = Propertied;
const symbol = Symbol("key");
class Symboled {
    constructor() {
        this[symbol] = 1;
    }
}
window.Symboled = Symboled;
Tests:
  • Property

     
    new Propertied();
  • Symbol

     
    new Symboled();