[Webkit-unassigned] [Bug 50804] [chromium] Reduce canvas.toDataURL("image/jpeg") run-time cost by 10%

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 13 07:46:03 PST 2010


--- Comment #12 from Stephen White <senorblanco at chromium.org>  2010-12-13 07:46:02 PST ---
(From update of attachment 76174)
I'm fine with this change, but I'm surprised that putting the conditional in the loop doesn't make performance worse.  Perhaps your tests are mostly alpha 255 or 0, and are benefiting disproportionately from branch prediction?

You could also look at writing an int at a time to the output, rather than a char at a time.  Of course, this would require unrolling 3X or so in order to write RGBR GBRG BRGB, kind of a pain, but usually nets a good speedup.

If this continues to be a bottleneck, it might be worth looking at an SSE2 version as well.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list