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>
var value = 42;
var ns = "http://www.w3.org/2000/svg";
var svg = document.createElementNS(ns, 'svg');
document.body.appendChild(svg);
var r1 = document.createElementNS(ns, 'rect');
r1.setAttribute('height', value++);
r1.setAttribute('width', value++);
r1.setAttribute('y', value++);
r1.setAttribute('x', value++);
r1.setAttribute('stroke', '#000000');
r1.setAttribute('fill', '#007fff');
svg.appendChild(r1);
var r1width_attr = r1.attributes[1];
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
setAttribute number |
| ready |
setAttribute string |
| ready |
set baseVal number |
| ready |
set attr value number |
| ready |
set attr value string |
| ready |
set attr nodeValue number |
| ready |
set attr nodeValue string |
| ready |
setAttributeNS number |
| ready |
setAttributeNS string |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.