Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114
Ubuntu
Desktop
one year ago
Test name Executions per second
IsArray (array) 102162696.0 Ops/sec
IsArray (null) 119560152.0 Ops/sec
typecheck (nullable dot) (array) 320817952.0 Ops/sec
typecheck (nullable dot) (null) 470962688.0 Ops/sec
manual check cond (array) 420352160.0 Ops/sec
manual check cond (null) 698253568.0 Ops/sec
typeof obj + length (array) 431785728.0 Ops/sec
typeof obj + length (null) 717073856.0 Ops/sec
Script Preparation code:
Tests:
  • IsArray (array)

  • IsArray (null)

  • typecheck (nullable dot) (array)

  • typecheck (nullable dot) (null)

  • manual check cond (array)

  • manual check cond (null)

  • typeof obj + length (array)

  • typeof obj + length (null)


;