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

Issue 1073863002: Rewrite memset benches, then use results to add a small-N optimization. (Closed)

Created:
5 years, 8 months ago by mtklein_C
Modified:
5 years, 8 months ago
Reviewers:
mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Rewrite memset benches, then use results to add a small-N optimization. The benches for N <= 10 get around 2x faster on my N7 and N9. I believe this is because of the reduced function-call-then-function-pointer-call overhead on the N7, and additionally because it seems autovectorization beats our NEON code for small N on the N9. My desktop is unchanged, though that's probably because N=10 lies well within a region where memset's performance is essentially constant: N=100 takes only about 2x as long as N=1 and N=10, which perform nearly identically. BUG=skia: Committed: https://skia.googlesource.com/skia/+/9ff378b01be0b0a3fc35677a2155ba4ade286cc2

Patch Set 1 #

Total comments: 2

Patch Set 2 : generalize #

Total comments: 4

Patch Set 3 : undef #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -95 lines) Patch
M bench/MemsetBench.cpp View 1 chunk +60 lines, -91 lines 0 comments Download
M include/core/SkUtils.h View 1 2 2 chunks +33 lines, -2 lines 0 comments Download
M src/core/SkUtils.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
mtklein_C
5 years, 8 months ago (2015-04-09 17:46:16 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1073863002/1
5 years, 8 months ago (2015-04-09 17:46:41 UTC) #4
commit-bot: I haz the power
This issue passed the CQ dry run.
5 years, 8 months ago (2015-04-09 17:53:33 UTC) #6
reed1
aside: I see we have sk_memcpy32? I wonder if the same sort of wrapper could ...
5 years, 8 months ago (2015-04-09 18:55:48 UTC) #7
reed1
Just read the part of your desc where the desktop was unchanged. Interesting (and a ...
5 years, 8 months ago (2015-04-09 18:56:51 UTC) #8
mtklein
https://codereview.chromium.org/1073863002/diff/1/include/core/SkUtils.h File include/core/SkUtils.h (right): https://codereview.chromium.org/1073863002/diff/1/include/core/SkUtils.h#newcode20 include/core/SkUtils.h:20: void sk_memset16_large(uint16_t dst[], uint16_t value, int count); On 2015/04/09 ...
5 years, 8 months ago (2015-04-09 19:11:10 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1073863002/20001
5 years, 8 months ago (2015-04-09 19:12:14 UTC) #12
commit-bot: I haz the power
This issue passed the CQ dry run.
5 years, 8 months ago (2015-04-09 19:19:00 UTC) #14
reed1
lgtm w/ comments about visibility of new symbols in a public header. Fine if we ...
5 years, 8 months ago (2015-04-09 20:30:24 UTC) #15
mtklein
https://codereview.chromium.org/1073863002/diff/20001/include/core/SkUtils.h File include/core/SkUtils.h (right): https://codereview.chromium.org/1073863002/diff/20001/include/core/SkUtils.h#newcode18 include/core/SkUtils.h:18: #define SK_SMALL_MEMSET 1000 On 2015/04/09 20:30:24, reed1 wrote: > ...
5 years, 8 months ago (2015-04-09 20:36:42 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1073863002/40001
5 years, 8 months ago (2015-04-09 20:37:07 UTC) #19
commit-bot: I haz the power
5 years, 8 months ago (2015-04-09 21:05:23 UTC) #20
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://skia.googlesource.com/skia/+/9ff378b01be0b0a3fc35677a2155ba4ade286cc2

Powered by Google App Engine
This is Rietveld 408576698