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://d3js.org/d3.v3.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<div id="container_d3"></div>
<div id="container_d3_single_attr"></div>
<div id="container_native_JS"></div>
<div id="container_raphael"></div>
//Create a SVG element with d3
var svg_d3 = d3.select("#container_d3").append("svg")
.attr("width", 400)
.attr("height", 400);
//Create a SVG element with d3
var svg_d3_single_attr = d3.select("#container_d3_single_attr").append("svg")
.attr("width", 400)
.attr("height", 400);
//Create a SVG element with native JS
var svg_native_JS = document.createElementNS("http://www.w3.org/2000/svg", "svg");
document.getElementById('container_native_JS').appendChild(svg_native_JS);
svg_native_JS.setAttributeNS(null, "width", 400);
svg_native_JS.setAttributeNS(null, "height", 400);
//Create a painting are with raphael
var paintarea = Raphael(document.getElementById("container_raphael"), 400, 400);
Ready to run.
Test | Ops/sec | |
---|---|---|
rect with d3 |
| ready |
rect with d3, single attr |
| ready |
rect with native JS |
| ready |
raphael |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.