Script Preparation code:
AخA
 
var MyStaticClass = (function() {
        function MyStaticClass() {}
        MyStaticClass.thing = function() {
            if (this.prop1 === "hi") {
                this.prop2++;
                this.prop3--;
                this.prop1 = "no";
            } else {
                this.prop1 = "hi";
            }
        };
        MyStaticClass.prop1 = "hi";
        MyStaticClass.prop2 = 0;
        MyStaticClass.prop3 = 0;
        return MyStaticClass;
    }()),
    MyStaticThing = (function() {
        var prop1 = "hi",
            prop2 = 0,
            prop3 = 0;
        return {
            thing: function() {
                if (prop1 === "hi") {
                    prop2++;
                    prop3--;
                    prop1 = "no";
                } else {
                    prop1 = "hi";
                }
            }
        };
    })();
Tests:
  • static class

     
    MyStaticClass.thing();
  • static thing

     
    MyStaticThing.thing();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    static class
    static thing

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Chrome 95 on Windows
View result in a separate tab
Test name Executions per second
static class 9997298.0 Ops/sec
static thing 9632832.0 Ops/sec