public
Last active

  • Download Gist
canvas-benchmarks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
10000 times
- lineTo() 0.001s
- fillStyle= hex 0.005s
- fillStyle= rgba() 0.004s
- fillRect() 0.078s
- strokeRect() 0.702s
- linear gradients 1.397s
- toBuffer() 200x200 (50 times) 0.226s
- toBuffer().toString("base64") 200x200 (50 times) 0.216s
- toDataURL() 200x200 (50 times) 0.219s
node-o3-canvas
- o3 lineTo() 0.226s
- o3 fillStyle= hex 0.03s
- o3 fillStyle= rgba() 0.04s
- o3 fillRect() 1.102s
- o3 strokeRect() 5.111s
- pngBuffer() 200x200 (50 times) 0.844s
- pngBuffer().toBase64() 200x200 (50 times) 0.837s

chrome results:

test.html:35
10000 times
- lineTo() 0.002s
- fillStyle= hex 0.003s
- fillStyle= rgba() 0.003s
- fillRect() 0.03s
- strokeRect() 0.192s
- linear gradients 1.962s
- toDataURL() 200x200 (50 times) 0.21s

FF 3.6 results:

10000 times
- lineTo() 0.007s
- fillStyle= hex 0.03s
- fillStyle= rgba() 0.035s
- fillRect() 8.223s
- strokeRect() 10.673s
- linear gradients 12.453s
- toDataURL() 200x200 (50 times) 0.175s

Safari 5.0:

10000 times
 - lineTo() 0.011s
 - fillStyle= hex 0.031s
 - fillStyle= rgba() 0.045s
 - fillRect() 0.024s
 - strokeRect() 0.162s
 - linear gradients 1.284s
 - toDataURL() 200x200 (50 times) 0.169s

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.