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
<canvas width="800" height="600" id="can"></canvas>
<script>
<script>
var ctx=document.getElementByID("can").getContext("2d");
var w =800; var h = 600;
var lines = [];
var i, n=30000, line;
for (i = 0; i<n; i++){
line=[]
line[0]=Math.random()*(w-1)
line[1]=Math.random()*(h-1)
lines.push(line);
}
ctx.beginPath();
ctx.moveTo(20,20);
for(i=0; i<n;i++){
var point=lines[i];
ctx.lineTo(point[0],point[1]);
}
</script>
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
drawlines |
| ready |
drawlines2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.