testivus

Benchmark created on


Setup

function InnerFunc(value) {
    var self = this;

    self.displayValue = value;

    self.getReadableText = function () {
        return self.displayValue;
    };
}

function ProtoFunc(value) {
    var self = this;

    self.displayValue = value;

    self.getReadableText = function () {
        return self.displayValue;
    };
}
ProtoFunc.prototype.getReadableText = function () {
	return this.displayValue;
}

Test runner

Ready to run.

Testing in
TestOps/sec
(new InnerFunc('valor')).getReadableText()
(new InnerFunc('valor')).getReadableText()
ready
(new ProtoFunc('valor')).getReadableText()
(new ProtoFunc('valor')).getReadableText()
ready

Revisions

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