Script Preparation code:
Tests:
  • instanceof

  • typeof

  • typeof no function

  • Object.prototype.toString.call

  • Object.prototype.toString.call reverse

  • constructor

  • costructor reverse

  • costructor ?.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    instanceof
    typeof
    typeof no function
    Object.prototype.toString.call
    Object.prototype.toString.call reverse
    constructor
    costructor reverse
    costructor ?.

    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: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111 on Windows
View result in a separate tab
Test name Executions per second
instanceof 4420706.0 Ops/sec
typeof 10375090.0 Ops/sec
typeof no function 5795984.0 Ops/sec
Object.prototype.toString.call 4009215.0 Ops/sec
Object.prototype.toString.call reverse 2349203.0 Ops/sec
constructor 1793806.0 Ops/sec
costructor reverse 1806773.0 Ops/sec
costructor ?. 2462273.0 Ops/sec