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://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/platform.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/polymer.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/document-register-element/0.1.2/document-register-element.js"></script>
var MyButtonPrototype = Object.create(HTMLButtonElement.prototype, {
createdCallback: {
value: function() {
this.myProperty = "test";
}
},
attachedCallback: {
value: function() {
console.log('attachedCallback:live on DOM ;-) ');
}
},
detachedCallback: {
value: function() {
console.log('detachedCallback: leaving the DOM :-( )');
}
},
attributeChangedCallback: {
value: function(name, previousValue, value) {
console.log(name, ' changed from ', previousValue, ' to ', value);
}
}
});
var MyButton = document.registerElement('my-button', {
prototype: MyButtonPrototype,
extends: 'button'
});
<polymer-element name="polymer-hello">
<template>
Hello <span id='p'>{{name}}</span> <content></content>!
</template>
<script>
Polymer('polymer-hello', {
name: 'LeLong'
});
</script>
</polymer-element>
Ready to run.
Test | Ops/sec | |
---|---|---|
document-register-element |
| ready |
polymer custom element |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.