Bug 85258 - Early-out for subtracting a non-intersecting region
: Early-out for subtracting a non-intersecting region
Product: WebKit
Classification: Unclassified
Component: New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Dana Jansens
Depends on:
  Show dependency treegraph
Reported: 2012-04-30 21:15 PDT by Dana Jansens
Modified: 2012-05-02 12:27 PDT (History)
8 users (show)

See Also:

Patch (1.41 KB, patch)
2012-04-30 21:20 PDT, Dana Jansens
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dana Jansens 2012-04-30 21:15:40 PDT
Early-out for subtracting a non-intersecting region
Comment 1 Dana Jansens 2012-04-30 21:20:02 PDT
Created attachment 139578 [details]
Comment 2 Hajime Morrita 2012-05-01 02:05:59 PDT
Comment on attachment 139578 [details]

Harvest all low hanging fruits!!
Comment 3 WebKit Review Bot 2012-05-01 02:14:28 PDT
Comment on attachment 139578 [details]

Clearing flags on attachment: 139578

Committed r115716: <http://trac.webkit.org/changeset/115716>
Comment 4 WebKit Review Bot 2012-05-01 02:14:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2012-05-01 13:14:18 PDT
Is this change for better performance or is it related to correctness? If it’s for better performance, what test demonstrates the improvement? How good is the improvement?
Comment 6 Dana Jansens 2012-05-01 13:32:20 PDT
It is for performance, if you subtract a Region that does not intersect, you would make a memcpy of the orignal region. Region copies are showing themselves to be very costly, you can see some backstory here https://bugs.webkit.org/show_bug.cgi?id=81076

I must confess I'm not sure what you mean by a test though, we use unit tests and layout tests to verify correctness, but I've never been asked to write a test to show performance differences.
Comment 7 Darin Adler 2012-05-01 13:37:02 PDT
Most performance-driven changes include information about some kind of performance test and data about the results before and after the code change. I can find you examples if you haven’t seen that in the WebKit project before.
Comment 8 Dana Jansens 2012-05-01 13:43:53 PDT
Sure, I'd love a good example, thanks.
Comment 9 Darin Adler 2012-05-02 12:27:05 PDT
I’m not sure these are the best examples, but three I found with a quick search are these: