Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
Chrome 74
Mac OS X 10.14.2
Desktop
5 years ago
Test name Executions per second
Not empty lodash.head() 5457632.5 Ops/sec
Not empty [0] 16677757.0 Ops/sec
Empty lodash.head() 5635166.0 Ops/sec
Empty [0] 16033918.0 Ops/sec
[0] with check 5772711.5 Ops/sec
[0] with null check 4220247.5 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