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
This test compares the image force re-rendering speeds of popular HTML5 Canvas libraries, such as KineticJS, Fabric.js, Paper.js, EaselJS, Raphael.js, and a baseline native canvas rendering.
Note: These tests don't compare apples to apples. Some libraries are much simpler in nature, and mostly provide an easier API for canvas drawing, while other libraries are much more complex and provide additional functionality, ultimately adding overhead.
<!-- image to render -->
<img width="104" height="75" id="sheep" style="display: none;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAABLCAYAAACcJMI5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBTs2QKAJQAAGx5fEIiAKoNAOz0ST4FANipk9wXANiiHKkIAI0BAJkoRyQCQLsAYFWBUiwCwMIAoKxAIi4EwK4BgFm2MkcCgL0FAHaOWJAPQGAAgJlCLMwAIDgCAEMeE80DIEwDoDDSv+CpX3CFuEgBAMDLlc2XS9IzFLiV0Bp38vDg4iHiwmyxQmEXKRBmCeQinJebIxNI5wNMzgwAABr50cH+OD+Q5+bk4eZm52zv9MWi/mvwbyI+IfHf/ryMAgQAEE7P79pf5eXWA3DHAbB1v2upWwDaVgBo3/ldM9sJoFoK0Hr5i3k4/EAenqFQyDwdHAoLC+0lYqG9MOOLPv8z4W/gi372/EAe/tt68ABx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I8B2xqjdvDDnY/aA0wXITMqtr646tq6y32HV2Lk7rVo5ZUi3g3IF6YHB7w6f6Lh3WhV36AF1ZUsHjtZlXYub3eFE+qWMJER9ANH5l5eega1CbB50vBqXZha4OJFY+T0yaLuLkvOdiZhEoTAl5oMxQknJTXuJLq7ZikrqUp8AVh2cKlzvt//WPs+rHDwpHsLOWaVlAzDJriCdlVVaM+juus3NlIwnbjpO4tOhrY5MqhDwggJiIx4Pn9XL+OUUqdPK5PG39RuxCW7ZIVNDB0Dc1nKMM0sR0HC0XXNlFmz36No8echJ6byZbmTEWD2TP/m3dmPsbUB//MkaOOwRSwrdTeWQRsBVXN1PTUrkDTvbDUlCQRT+I6Niv/8Sn3TblSD8aqc1b278KaWW9RUrZTbd25h2Ubtrg19U02EJPUHX2rgbtbaw90MJOEb10Um6vZ33NwYl3A0AqHFGQRNDTilk1NUujUpQu5mRFsxyFpWsQSppTvqtqzcXulPfLs8zqcO2UKgVCIHVu3s2T+e3z21utUVez4JBLNGjhgxC8jE66dSpfC3gTDYUTAcWyUUmiajrgu8aYGdpXvYOVHC1ky7x0qtm1l55bNmMkEIlLlfbaQFw0bgV1eK2Ep8AlQsr/9np+ymv2tVWvLtr8T4Df0ODBCQURSkccmdX7bbJEDGN6j6flAXTQnr0skMxo1lDg9e/WoKOrX77mXnn/hqV07d14EXOcPBLPzO3YKZObkoZTCsVItENd1ScbjEmuod5rqa3XLNB0v/O4gde9qL289/U9d1zMB13GcmgNq8h1KgH7I9ZRSflIHN02vRfx9bWIN6BLw+0IzHnrY7nz44Y22Ze287IILqKmuhtTRr2LgdKCD93qH1P2tcaAeqPCgrAK2kOpkt4oOhTT7gD6IiJhKKfGMuD9lcRfYpum6nhmNiqZpru04LSdMA6mbwj7+noL2fh1dCPh9WLaN6/74fxtCpf9/0KGt9J+CSQNKKw0oDSitNKC00oDSgNJKA0oDSisNKK391/8MAHkcMTYWudccAAAAAElFTkSuQmCC" />
<!-- native canvas -->
<canvas id="natCanvas" width="512" height="512"></canvas>
<!-- KineticJS -->
<div id="kinContainer"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/kineticjs/5.0.1/kinetic.min.js"></script>
<!-- Fabric.js -->
<div id="fabContainer"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.4.0/fabric.min.js"></script>
<!-- EaselJS -->
<canvas id="easCanvas" width="512" height="512"></canvas>
<script src="https://cdnjs.cloudflare.com/ajax/libs/EaselJS/0.7.1/easeljs.min.js"></script>
<!-- Paper.js -->
<canvas id="papCanvas" width="512" height="512"></canvas>
<script src="https://cdn.bootcss.com/paper.js/0.9.18/paper-core.min.js"></script>
<!-- Raphael.js -->
<div id="rapContainer"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.2/raphael-min.js"></script>
var imgEL = document.getElementById('sheep');
// =================== native canvas
var natCanvas = document.getElementById('natCanvas');
var natContext = natCanvas.getContext('2d');
// =================== KineticJS
var kinStage = new Kinetic.Stage({
container: 'kinContainer',
width: 512,
height: 512
});
var kinLayer = new Kinetic.Layer();
kinStage.add(kinLayer);
// =================== Fabric.js
var fabCanvasEL = document.createElement('canvas');
fabCanvasEL.id = 'fabCanvas';
fabCanvasEL.width = 512;
fabCanvasEL.height = 512;
document.getElementById('fabContainer').appendChild(fabCanvasEL);
var fCanvas = new fabric.Canvas('fabCanvas');
// =================== EaselJS
var easStage = new createjs.Stage('easCanvas');
// =================== Paper.js
var papCanvas = document.getElementById('papCanvas');
paper.setup(papCanvas);
// =================== Raphael.js
var rapPaper = Raphael('rapContainer', 512, 512);
// =================== native canvas
natContext.save();
natContext.setTransform(1, 0, 0, 1, 0, 0);
natContext.clearRect(0, 0, 512, 512);
natContext.restore();
// =================== KineticJS
kinStage.destroy();
//document.getElementById('kinContainer').innerHTML = '';
// =================== EaselJS
easStage.removeAllChildren();
easStage.enableMouseOver(0);
easStage.enableDOMEvents(false);
easStage.canvas = null;
// =================== Fabric.js
var canvasContainer = fCanvas.getElement().parentNode;
fCanvas.clear();
fCanvas.dispose();
if (canvasContainer.parentNode) {
canvasContainer.parentNode.removeChild(canvasContainer);
}
// =================== Paper.js
paper.project.remove();
// =================== Raphael.js
//document.getElementById('rapContainer').innerHTML = '';
rapPaper.clear();
rapPaper.remove();
Ready to run.
Test | Ops/sec | |
---|---|---|
KineticJS |
| ready |
Fabric.js |
| ready |
Native Canvas |
| ready |
EaselJS |
| ready |
Paper.js |
| ready |
Raphael.js |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.