4 ms·
MAJOR EDIT: The first tests I accidentally ran against aurora (22a) and not the nightly (23a). Running against the nightly, the numbers are much closer, though
by simonsarris 14y ago
MAJOR EDIT: The first tests I accidentally ran against aurora (22a) and not the nightly (23a). Running against the nightly, the numbers are much closer, though sometimes better on either 21 or 23a for some simple things.
But running the typed array/pixel manipulation test, 23a seems twice as fast as the beta!
http://i.imgur.com/x2otAI1.png http://i.imgur.com/x2otAI1.png
Please feel free to confirm using http://jsperf.com/canvas-pixel-manipulation/6 http://jsperf.com/canvas-pixel-manipulation/6
Original post below, with erroneous benches removed:
~~~
Hmm, I have a lot of HTML canvas-based performance tests, so I plucked two of them to give a small comparison a go. Comparing the results of these simple exercises doesn't seem too promising.
The first test I used was a simple one that merely sets every canvas propery (some can be time consuming): http://jsperf.com/can-attribs http://jsperf.com/can-attribs
And the second one tests different ways of filling single pixels: http://jsperf.com/filling-pixels http://jsperf.com/filling-pixels
From a practical standpoint canvas performance matters very much to me, but my tests probably aren't the best metric. Are there better tests that could be used to see the difference between the old and new compilers here?
edit: on a test comparing typed arrays to plain, performance seemed nearly (merely?) identical: http://jsperf.com/canvas-pixel-manipulation/6 http://jsperf.com/canvas-pixel-manipulation/6
- leeoniya 14y agoi also have a lot of canvas-heavy code and use typed arrays pretty extensively. i think that mozilla's canvas implementation is actually the bottleneck here, not the JS. chrome's canvas proves to be much faster, though.
- leeoniya 14y agoi reported the issue about a year ago, FYI. https://bugzilla.mozilla.org/show_bug.cgi?id=746773 https://bugzilla.mozilla.org/show_bug.cgi?id=746773
- bzbarsky 14y agoThat issue is basically fixed in most sane code, actually; I just resolved it as such. For example, on http://jsperf.com/pixel-pre-rendering/5 http://jsperf.com/pixel-pre-rendering/5 I see identical numbers for the two versions of the test.
- Ygg2 14y agoNice work, I hope Mozilla guys see this and fix it to be close to their respective performances :)
- kannanvijayan 14y agoI'm not sure which builds you compared. Firefox 22 is currently in Aurora phase, and Firefox 21 is Beta. It does seem like there's been a regression in the aggregate scores. Thanks for bringing it up, though, that should be looked into. Have you submitted this regression to bugzilla.mozilla.org? If not, I'll create one for it to be looked into. Just for kicks I ran can-attribs on a pre-Baseline and post-Baseline build of firefox nightly on my macbook, and the scores received a modest (about 2-3% average) bump from the landing.
- cpeterso 14y agoFirefox Nightly is version 23, not 22.
- simonsarris 14y agoOh dear I opened Aurora and not Nightly. I feel like a dunce! I made edits to my comment, including (thankfully) the conclusion.
- cpeterso 14y agoThat's understandable. It sounds like you have a whole lot of Firefoxes. :) Plus Firefox Nightly switched from 22 to 23 just a few days ago.
- shocks 14y agoI got 5,159 and 7,703 with Firefox Nightly (v23). I got 2,566 and 4,895 with Chrome Canary (v28).