Script Preparation code:
Tests:

Historical Performance Data aggregated from 34 community runs

Desktop Results:
Chrome 22 runs
nodeType literal
5.6M/s
nodeType
4.6M/s
instanceof
4.0M/s

Fastest: nodeType literal (1.4x faster)

View exact numbers
  • nodeType literal: 5,614,644 ops/sec
  • nodeType: 4,561,516 ops/sec
  • instanceof: 3,965,375 ops/sec
Firefox 12 runs
nodeType
38.5M/s
nodeType literal
37.9M/s
instanceof
26.8M/s

Fastest: nodeType (1.4x faster)

View exact numbers
  • nodeType: 38,493,148 ops/sec
  • nodeType literal: 37,933,132 ops/sec
  • instanceof: 26,783,040 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    nodeType
    instanceof
    nodeType literal

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 days ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:152.0) Gecko/20100101 Firefox/152.0
Firefox 152 on Ubuntu
View result in a separate tab
nodeType literal
53.2M/s
nodeType
52.6M/s
instanceof
33.3M/s
View exact numbers
Test name Executions per second
nodeType literal 53,234,760 Ops/sec
nodeType 52,586,720 Ops/sec
instanceof 33,341,248 Ops/sec