HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 51 community runs

Desktop Results:
Chrome 45 runs
string type
21.3M/s
instanceof
9.8M/s
property
8.8M/s
string type + undefined
8.6M/s

Fastest: string type (2.5x faster)

View exact numbers
  • string type: 21,266,100 ops/sec
  • instanceof: 9,830,011 ops/sec
  • property: 8,758,757 ops/sec
  • string type + undefined: 8,618,235 ops/sec
Firefox 6 runs
string type
1352.1M/s
string type + undefined
1323.8M/s
property
1292.8M/s
instanceof
168.5M/s

Fastest: string type (8.0x faster)

View exact numbers
  • string type: 1,352,126,080 ops/sec
  • string type + undefined: 1,323,798,016 ops/sec
  • property: 1,292,818,048 ops/sec
  • instanceof: 168,513,024 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
    instanceof
    string type
    string type + undefined
    property

    Fastest: N/A

    Slowest: N/A

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/137.0.0.0 Safari/537.36 Edg/137.0.0.0
Chrome 137 on Windows
View result in a separate tab
string type + undefined
151.2M/s
property
148.0M/s
instanceof
144.0M/s
string type
135.3M/s
View exact numbers
Test name Executions per second
string type + undefined 151,225,232 Ops/sec
property 147,963,712 Ops/sec
instanceof 144,025,936 Ops/sec
string type 135,276,976 Ops/sec