Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
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
- 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
tj commented

chrome results:

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

tj commented

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
tj commented

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

Upgraded version of the benchmarks? I'm interested about how node-canvas compares to node-openvg-canvas... :-)


@piranna check out the build logs from what will be 1.2.9+. It's a bit hard to compare because I changed how the benchmarks run. If you convert ops/sec to sec/10k ops they're roughly the same with a few exceptions (linear gradients, toBuffer, strokeRect, and fillRect due to a bug). column I

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.