Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36
Chrome 87
Windows 8.1
Desktop
3 years ago
Test name Executions per second
Object-Function 519711968.0 Ops/sec
Object-plain 519662752.0 Ops/sec
If-Else 520391392.0 Ops/sec
Ternary 532746272.0 Ops/sec
Switch 525208320.0 Ops/sec
Tests:
  • Object-Function

  • Object-plain

  • If-Else

  • Ternary

  • Switch

  • Object-Get


;