Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Issue 1593073002: speedup mip builders (Closed)

Created:
4 years, 11 months ago by reed1
Modified:
4 years, 11 months ago
Reviewers:
mtklein, f(malita)
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

speedup mip builders 1. push the inner-loop into the procs 2. for the 3x3 and 3x2 cases, skip the redundant horizontal read/expand Some before/after timings (unfortunately there's a lot of variance) -- on MacBook Air Before 9/9 MB 1 1.45ms 1.65ms 1.92ms 2.93ms 31% ▂█▂▁▁▁▂█▆▂ nonrendering mipmap_build_512x512 9/9 MB 1 1.85ms 2.33ms 2.47ms 3.69ms 28% ▃██▄▃▂▁▂▁▁ nonrendering mipmap_build_511x512 9/9 MB 1 2.15ms 2.21ms 2.37ms 3.28ms 15% █▂▂▁▁▁▁▅▁▁ nonrendering mipmap_build_512x511 9/9 MB 1 2.74ms 3.9ms 4.03ms 5.89ms 25% ▄▂▃▄█▂▁▂▇▅ nonrendering mipmap_build_511x511 After 10/10 MB 1 1.08ms 1.09ms 1.1ms 1.18ms 3% ▁▁▁▁▁▁▁█▃▁ nonrendering mipmap_build_512x512 10/10 MB 1 1.22ms 1.44ms 1.66ms 2.83ms 30% ▂▂▄▁▁▃█▅▂▁ nonrendering mipmap_build_511x512 10/10 MB 1 1.45ms 1.91ms 2.04ms 3.75ms 36% ▁▁▁▃▅█▃▂▂▂ nonrendering mipmap_build_512x511 10/10 MB 1 1.7ms 1.7ms 1.81ms 2.41ms 13% █▁▁▁▁▁▁▁▁▄ nonrendering mipmap_build_511x511 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1593073002 Committed: https://skia.googlesource.com/skia/+/326253ef22d39e72a729e8069e54b34ade72ad1b

Patch Set 1 : 1. push inner-loop into proc #

Patch Set 2 : 2. remove redundant load/expand of 1 pixel per-row #

Total comments: 4

Patch Set 3 : fix copy/paste bug, remove unneeded prevW/H #

Patch Set 4 : smarten up loop setup (via fmalita) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -73 lines) Patch
M src/core/SkMipMap.cpp View 1 2 3 4 chunks +87 lines, -73 lines 0 comments Download

Messages

Total messages: 28 (13 generated)
reed1
ptal I bet a next improvement may be using faster ways to expand/compact ...
4 years, 11 months ago (2016-01-16 15:54:54 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593073002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593073002/20001
4 years, 11 months ago (2016-01-16 15:57:10 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593073002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593073002/40001
4 years, 11 months ago (2016-01-16 16:45:42 UTC) #9
f(malita)
Awesome! https://codereview.chromium.org/1593073002/diff/20001/src/core/SkMipMap.cpp File src/core/SkMipMap.cpp (right): https://codereview.chromium.org/1593073002/diff/20001/src/core/SkMipMap.cpp#newcode430 src/core/SkMipMap.cpp:430: } Instead of unrolling a full iteration, could ...
4 years, 11 months ago (2016-01-16 16:46:10 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-16 16:56:03 UTC) #12
reed1
https://codereview.chromium.org/1593073002/diff/20001/src/core/SkMipMap.cpp File src/core/SkMipMap.cpp (right): https://codereview.chromium.org/1593073002/diff/20001/src/core/SkMipMap.cpp#newcode430 src/core/SkMipMap.cpp:430: } On 2016/01/16 16:46:10, f(malita) wrote: > Instead of ...
4 years, 11 months ago (2016-01-16 17:03:10 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593073002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593073002/60001
4 years, 11 months ago (2016-01-16 17:10:12 UTC) #17
reed1
ptal
4 years, 11 months ago (2016-01-16 17:11:56 UTC) #18
f(malita)
LGTM On 2016/01/16 15:54:54, reed1 wrote: > I bet a next improvement may be using ...
4 years, 11 months ago (2016-01-16 17:18:31 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-16 17:21:35 UTC) #21
reed1
I'm been thinking a little bit about lazy scaling too. I don't see any problem ...
4 years, 11 months ago (2016-01-16 17:21:58 UTC) #22
reed1
I'm also interested in trying out tri-lerp, as something we could enable in HQ mode. ...
4 years, 11 months ago (2016-01-16 17:22:55 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593073002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593073002/60001
4 years, 11 months ago (2016-01-16 17:23:13 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://skia.googlesource.com/skia/+/326253ef22d39e72a729e8069e54b34ade72ad1b
4 years, 11 months ago (2016-01-16 17:23:52 UTC) #27
reed1
4 years, 11 months ago (2016-01-16 17:26:16 UTC) #28
Message was sent while issue was closed.
The numbers are still very noisy, but here's a bench run only building the first
level...

   9/9  
MB	1	922µs	930µs	929µs	950µs	1%	▄▁▁▄▁▁▁▃█▃	nonrendering	mipmap_build_512x512
   9/9  
MB	1	889µs	1.05ms	1.06ms	1.54ms	17%	▃▃▃▂▂█▃▂▁▁	nonrendering	mipmap_build_511x512
   9/9  
MB	1	1.06ms	1.14ms	1.31ms	2.15ms	30%	█▆▃▂▂▁▁▁▁▁	nonrendering	mipmap_build_512x511
   9/9  
MB	1	1.28ms	1.69ms	1.65ms	2.54ms	22%	▃▃▄▃▃▂▁▁▁█	nonrendering	mipmap_build_511x511

Powered by Google App Engine
This is Rietveld 408576698