Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0
Firefox 66
Mac OS X 10.14
Desktop
5 years ago
Test name Executions per second
Lodash for valid case 35612876.0 Ops/sec
Native for valid case using instanceof 109463648.0 Ops/sec
Native for valid case using typeof 253794304.0 Ops/sec
Lodash for invalid case 77622120.0 Ops/sec
Native for invalid case using instanceof 109236128.0 Ops/sec
Native for invalid case using typeof 326636032.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Lodash for valid case

  • Native for valid case using instanceof

  • Native for valid case using typeof

  • Lodash for invalid case

  • Native for invalid case using instanceof

  • Native for invalid case using typeof


;