jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
Fixed version of is this slower that var test
<script>
var Template = function(name) {
this.name = name;
this.one = {
two: {
three: name,
foo: 1,
bar: 1,
baz: 1,
quux: 1
},
foo: 1,
bar: 1,
baz: 1,
quux: 1
};
var privatName = name;
this.getVar = function() {
var name = 'Ryan';
return name;
};
};
Template.prototype = {
getName: function() {
return this.name;
},
getDeep: function() {
return this.one.two.three;
}
};
var obj = new Template('Ryan');
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Get var test |
| ready |
Get using this test |
| ready |
Get using this deep |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.