Early-out for subtracting a non-intersecting region
Created attachment 139578 [details] Patch
Comment on attachment 139578 [details] Patch Harvest all low hanging fruits!!
Comment on attachment 139578 [details] Patch Clearing flags on attachment: 139578 Committed r115716: <http://trac.webkit.org/changeset/115716>
All reviewed patches have been landed. Closing bug.
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?
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.
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.
Sure, I'd love a good example, thanks.
I’m not sure these are the best examples, but three I found with a quick search are these: http://trac.webkit.org/changeset/114912 http://trac.webkit.org/changeset/114351 http://trac.webkit.org/changeset/112387