Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15
Safari 16
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Not empty lodash.head() 12528405.0 Ops/sec
Not empty [0] 29147418.0 Ops/sec
Empty lodash.head() 12979280.0 Ops/sec
Empty [0] 31781504.0 Ops/sec
[0] with check 10494830.0 Ops/sec
[0] with null check 8238854.0 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