DescriptionOptimize 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 #
MessagesTotal messages: 20
|