Call function overhead

Benchmark created on


Preparation HTML

<script>
  var App = {
   my: "My Name is Alan",
   set: function(value) {
     this.my = value;
    },
   get: function() {
     return this.my;
    },
   getSet: function(val) {
     if(val) {
      this.my = val;
      return this;
     } else {
      return this.my;
     }
   }};
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Reference
App.my = "New string";
App.my;
ready
Simple Getter
App.set("New string");
App.get();
ready
Getter with Setter
App.getSet("New string").getSet();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.