Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Chrome 91
Linux
Desktop
3 years ago
Test name Executions per second
Object-Function 6392299.5 Ops/sec
Object-plain 7026805.5 Ops/sec
If-Else 1790927.0 Ops/sec
Ternary 1791584.4 Ops/sec
Switch 7075311.5 Ops/sec
Object-Get 1048951.0 Ops/sec
Tests:
  • Object-Function

  • Object-plain

  • If-Else

  • Ternary

  • Switch

  • Object-Get