Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36
Chrome 88
Mac OS X 11.1.0
Desktop
3 years ago
Test name Executions per second
Not empty lodash.head() 4751419.0 Ops/sec
Not empty [0] 15871386.0 Ops/sec
Empty lodash.head() 4811028.5 Ops/sec
Empty [0] 15538072.0 Ops/sec
[0] with check 4412896.5 Ops/sec
[0] with null check 3779105.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Not empty lodash.head()

  • Not empty [0]

  • Empty lodash.head()

  • Empty [0]

  • [0] with check

  • [0] with null check