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
<img id="image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3AsBDQAlJZhnlAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAACUSURBVDjLtZQxEoAwCASFsbD0q77Er1ranUUUkUBCCqkYhj0SSCAA02NEJL6OR0aSpMnaXK0bbpORBAEQ8ji34qzLnlF5CwpZm6sFIAVHKmOwkeBMhagFP1ROGsvo6rN1B9aq3L0IJwcrEXEA8FCHNOm87eiFlriB5/yFDTkwKrfzbMTcJB38LI/kMnD/M+f3Tp1wAbs6YSHsID+BAAAAAElFTkSuQmCC"></img>
<canvas id="canvas"></canvas>
<canvas id="canvas_f"></canvas>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var img = document.getElementById('image');
canvas.width = 20;
canvas.height = 20;
var canvas_f = document.getElementById('canvas_f');
var ctx_f = canvas_f.getContext('2d');
canvas_f.width = 20;
canvas_f.height = 20;
ctx_f.translate(((img.width / 2) * 2), 0);
ctx_f.scale(-1, 1);
Ready to run.
Test | Ops/sec | |
---|---|---|
normal draw |
| ready |
horizontally flipped draw |
| ready |
horizontally flipped draw (prepared canvas) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.