312319sakd

Benchmark created on


Preparation HTML

<script>
function Person() {
    this._age = Math.random();
}

Person.prototype.age = function() {
    return this._age;
};
var a = new Person();

function fun( a ) {

return a.age() === 3;
}

function prop( a ) {
 return a._age === 3;
}
var a = new Person();
var l = 1e5;
while(l--) {
     fun(a); prop(a);
}

</script>

Setup

var a = new Person();

Test runner

Ready to run.

Testing in
TestOps/sec
fun
if( fun(a) ) die
ready
prop
if( prop(a) ) die
ready

Revisions

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