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
<script src="http://nin-jin.github.io/atom/view.env=web.stage=release.js"></script>
<script>
function Foo(foo) {
this.foo = foo;
this.bar = 42;
}
function FooBar(foo, bar) {
this.foo = foo;
this.bar = bar;
}
function Boo() {}
$jin.klass({ 'JinFoo': [] })
$jin.property({ 'JinFoo..foo': String })
$jin.klass({ 'JinFooI': [] })
$jin.method({ 'JinFooI..init': function( foo ){
'$jin.klass..init'
this._foo = foo
} })
$jin.klass({ 'JinBoo': [] })
function GetSet( foo ){
this.setFoo( foo )
}
GetSet.prototype.setFoo = function( foo ){
this._foo = String( foo )
return this
}
GetSet.prototype.getFoo = function( foo ){
return this._foo
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
object literal |
| ready |
new Object |
| ready |
new Foo |
| ready |
empty object literal |
| ready |
new empty Object |
| ready |
new Boo |
| ready |
empty object literal + init |
| ready |
new Boo + init |
| ready |
new Foo + new valus |
| ready |
new FooBar |
| ready |
JinBoo() |
| ready |
new JinBoo |
| ready |
JinFoo() |
| ready |
new JinFoo() |
| ready |
JinFoo + init |
| ready |
new GetSet |
| ready |
new JinFooI |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.