html5 canvas & Path2D speed test

Benchmark created on


Preparation HTML

<canvas></canvas>

Setup

var ctx = document
.querySelector('canvas')
.getContext('2d');
ctx.beginPath();
ctx.lineTo(100, 0);
var path=ctx.fill();

Test runner

Ready to run.

Testing in
TestOps/sec
using Path2D
ctx.fill(path)
ready
using CanvasRenderingContext2D

ctx.beginPath();
ctx.lineTo(100, 0);
ctx.fill();
ready

Revisions

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