Created
November 5, 2010 21:44
-
-
Save tj/664922 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
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+. https://travis-ci.org/Automattic/node-canvas/jobs/79960720#L3254 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).
https://docs.google.com/spreadsheets/d/1XVqSPe2Lt91Z9MTQCvSlwGniu0v8z8jg7OAKW4GipMA/edit?usp=sharing column I
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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