Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(285)

Issue 7237055: Optimize region intersection if A contains B

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by gyagp
Modified:
4 months, 4 weeks ago
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlecode.com/svn/trunk
Visibility:
Public.

Description

Optimize region intersection if A contains B This patchset is to optimize the region intersection if one region contains another. The fix is straightforward, but I also wrote a bench to cover this. Test command: time out/Release/bench --match region_contain_sect --repeat 10000 Test result: Original code: running bench [640 480] region_contain_sect 8888: cmsecs = 0.67 out/Release/bench --match region_contain_sect --repeat 10000 7.04s user 0.07s system 99% cpu 7.153 total Optimized code: running bench [640 480] region_contain_sect 8888: cmsecs = 0.06 out/Release/bench --match region_contain_sect --repeat 10000 0.88s user 0.07s system 97% cpu 0.979 total It's about 10x speedup. BUG=

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix date in header #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -0 lines) Patch
A bench/RegionContainBench.cpp View 1 1 chunk +69 lines, -0 lines 0 comments Download
M gyp/bench.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkRegion.cpp View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 20
gyagp
11 years, 10 months ago (2013-01-30 09:16:37 UTC) #1
reed1
Patch looks clean. Do we see any real slow-down in the case where one does ...
11 years, 10 months ago (2013-01-30 13:54:19 UTC) #2
gyagp
> -----Original Message----- > From: reed@google.com [mailto:reed@google.com] > Sent: Wednesday, January 30, 2013 9:54 PM ...
11 years, 10 months ago (2013-01-30 14:38:21 UTC) #3
reed1
My question is: have you run the other benchmarks for region to see if there ...
11 years, 10 months ago (2013-01-30 15:00:54 UTC) #4
gyagp
> -----Original Message----- > From: reed@google.com [mailto:reed@google.com] > Sent: Wednesday, January 30, 2013 11:01 PM ...
11 years, 10 months ago (2013-01-30 15:56:13 UTC) #5
reed1
That is exactly the test I wanted to see performed. I agree that any slowdown ...
11 years, 10 months ago (2013-01-30 17:01:45 UTC) #6
rmistry
https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp File bench/RegionContainBench.cpp (right): https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp#newcode3 bench/RegionContainBench.cpp:3: * Copyright 2011 Google Inc. nit: 2011 -> 2013
11 years, 10 months ago (2013-01-30 17:10:59 UTC) #7
gyagp
Fixed and please review it again. Thanks! On 2013/01/30 17:10:59, rmistry wrote: > https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp > ...
11 years, 10 months ago (2013-01-31 02:39:03 UTC) #8
gyagp
https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp File bench/RegionContainBench.cpp (right): https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp#newcode3 bench/RegionContainBench.cpp:3: * Copyright 2011 Google Inc. On 2013/01/30 17:10:59, rmistry ...
11 years, 10 months ago (2013-01-31 02:49:40 UTC) #9
rmistry
On 2013/01/31 02:49:40, gyagp wrote: > https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp > File bench/RegionContainBench.cpp (right): > > https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp#newcode3 > ...
11 years, 10 months ago (2013-01-31 13:38:26 UTC) #10
reed1
On 2013/01/31 13:38:26, rmistry wrote: > On 2013/01/31 02:49:40, gyagp wrote: > > https://codereview.appspot.com/7237055/diff/1/bench/RegionContainBench.cpp > ...
11 years, 10 months ago (2013-01-31 15:02:50 UTC) #11
DerekS
just use -p1 on the patch command to strip out the a/b directory stuff that ...
11 years, 10 months ago (2013-01-31 15:15:06 UTC) #12
reed1
committed in rev. 7491
11 years, 10 months ago (2013-01-31 15:24:42 UTC) #13
epoger
On 2013/01/31 15:15:06, DerekS wrote: > just use -p1 on the patch command to strip ...
11 years, 10 months ago (2013-01-31 16:39:23 UTC) #14
lux.kochetkov
On 2013/01/31 16:39:23, epoger wrote: > On 2013/01/31 15:15:06, DerekS wrote: > > just use ...
8 years, 3 months ago (2016-09-07 20:30:46 UTC) #15
lux.kochetkov
More of an old 👵
8 years, 3 months ago (2016-09-07 20:35:18 UTC) #16
reed1
The optimization seems to be in the code (not sure when it was added). So ...
8 years, 3 months ago (2016-09-07 20:44:57 UTC) #17
status.rpni
Publikasi
5 years, 4 months ago (2019-08-07 19:38:03 UTC) #18
fundasecgin32
5 months, 1 week ago (2024-07-11 15:08:35 UTC) #19
fundasecgin32
4 months, 4 weeks ago (2024-07-25 11:46:12 UTC) #20

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b