Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Chrome 96
Windows
Desktop
2 years ago
Test name Executions per second
isEmpty empty array 2790907.2 Ops/sec
length empty array 6325057.0 Ops/sec
custom isEmpty empty array 1892521.2 Ops/sec
isEmpty array of strings 2781985.2 Ops/sec
length array of strings 6230020.0 Ops/sec
custom isEmpty array of strings 1476124.5 Ops/sec
isEmpty array of objects 2785795.2 Ops/sec
length empty array of objects 6267969.5 Ops/sec
custom isEmpty array of objects 1568081.4 Ops/sec
isEmpty empty string 3342131.2 Ops/sec
length empty string 6239350.0 Ops/sec
custom isEmpty empty string 2481998.0 Ops/sec
isEmpty filled string 3372925.0 Ops/sec
length filled string 6219536.5 Ops/sec
custom isEmpty filled string 2398670.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • isEmpty empty array

  • length empty array

  • custom isEmpty empty array

  • isEmpty array of strings

  • length array of strings

  • custom isEmpty array of strings

  • isEmpty array of objects

  • length empty array of objects

  • custom isEmpty array of objects

  • isEmpty empty string

  • length empty string

  • custom isEmpty empty string

  • isEmpty filled string

  • length filled string

  • custom isEmpty filled string