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)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    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)

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 10 months ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114 on Ubuntu
View result in a separate tab
Test name Executions per second
IsArray (array) 102162700.0 Ops/sec
IsArray (null) 119560200.0 Ops/sec
typecheck (nullable dot) (array) 320818000.0 Ops/sec
typecheck (nullable dot) (null) 470962700.0 Ops/sec
manual check cond (array) 420352200.0 Ops/sec
manual check cond (null) 698253600.0 Ops/sec
typeof obj + length (array) 431785700.0 Ops/sec
typeof obj + length (null) 717073900.0 Ops/sec