fasfsafsdfsd

Benchmark created by asds on


Setup

function MyObject2(name, message) {
      this.name = name.toString();
      this.message = message.toString();
      this.getName = function() {
        return this.name;
      };
     
      this.getMessage = function() {
        return this.message;
      };
    }
    var a=new MyObject2("a","z")
    function MyObject(name, message) {
      this.name = name.toString();
      this.message = message.toString();
    }
    MyObject.prototype = {
      getName: function() {
        return this.name;
      },
      getMessage: function() {
        return this.message;
      }
    }
    var b=new MyObject("a","z")

Test runner

Ready to run.

Testing in
TestOps/sec
asd
a.getName();
ready
safsdcsd
b.getName();
ready

Revisions

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

  • Revision 1: published by asds on