HTML Preparation code:
AخA
 
1
<script>
2
class TestClass {
3
    constructor() {
4
        this.a = 2;
5
    }
6
}
7
</script>
Script Preparation code:
 
var obj = new TestClass();
Tests:
  • instanceof

     
    obj instanceof TestClass;
  • property undefined

     
    obj.a !== undefined
  • property in

     
    'a' in obj
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    instanceof
    property undefined
    property in

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0
Firefox 135 on Windows
View result in a separate tab
Test name Executions per second
instanceof 154958880.0 Ops/sec
property undefined 1047604032.0 Ops/sec
property in 1335977600.0 Ops/sec