HTML Preparation code:
x
 
1
<script>
2
    // Define the EmptyClass
3
    class EmptyClass {
4
        EmptyClass(a, b) {
5
            this.a = a;
6
            this.b = b;
7
        }
8
    }
9
10
    var resulting = {
11
        instance: null
12
    };
13
</script>
Tests:
  • new EmptyClass

     
    const instance = new EmptyClass(1,2);
    resulting.instance = instance;
  • Object.create(EmptyClass);

     
    const instance = Object.create(EmptyClass);
    instance.a = 1;
    instance.b = 2;
    resulting.instance = instance;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    new EmptyClass
    Object.create(EmptyClass);

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
Firefox 135 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
new EmptyClass 186718672.0 Ops/sec
Object.create(EmptyClass); 66215348.0 Ops/sec