Public ES6 property (get) vs Public Getter function vs Public Directly get vs Public ES6 property (set) vs Public Setter function vs Public Directly set vs Private ES6 property (get) vs Private Getter function vs Private ES6 property (set) vs Private Setter function| Test case name | Result |
|---|---|
| Public ES6 property (get) | |
| Public Getter function | |
| Public Directly get | |
| Public ES6 property (set) | |
| Public Setter function | |
| Public Directly set | |
| Private ES6 property (get) | |
| Private Getter function | |
| Private ES6 property (set) | |
| Private Setter function |
| Test name | Executions per second |
|---|---|
| ✓ Public ES6 property (get) | 492,417,024 Ops/sec |
| Public Getter function | 457,440,608 Ops/sec |
| Public Directly get | 439,977,152 Ops/sec |
| Private Getter function | 437,433,824 Ops/sec |
| Public ES6 property (set) | 409,728,416 Ops/sec |
| Private Setter function | 404,419,936 Ops/sec |
| Private ES6 property (set) | 393,028,672 Ops/sec |
| Private ES6 property (get) | 347,661,888 Ops/sec |
| Public Setter function | 266,689,936 Ops/sec |
| Public Directly set | 264,156,992 Ops/sec |