jcanvas vs native canvas (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://rawgit.com/caleb531/jcanvas/master/jcanvas.js"></script>

<canvas id = "can" width="400" height="400"></canvas>

Setup

var $can = $('#can');
    var ctx = $can[0].getContext('2d');
    ctx.fillStyle = 'rgb(0,0,0)';

Test runner

Ready to run.

Testing in
TestOps/sec
jcanvas
var x = Math.random() * 400;
var y = Math.random() * 400;
var r = Math.random() * 50;
$can.drawArc({
  fillStyle: "#000",
  radius: r,
  x: x,
  y: y,
})
ready
native canvas
var x = Math.random() * 400;
var y = Math.random() * 400;
var r = Math.random() * 50;
ctx.beginPath();
ctx.arc(x, y, r, 0, Math.PI * 2, true);
ctx.closePath();
ctx.fill();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.