Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Chrome 69
Mac OS X 10.14.0
Desktop
6 years ago
Test name Executions per second
Not empty lodash.head() 3724601.2 Ops/sec
Not empty [0] 12471429.0 Ops/sec
Empty lodash.head() 3710540.8 Ops/sec
Empty [0] 12656897.0 Ops/sec
[0] with check 3781893.0 Ops/sec
[0] with null check 2897737.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