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

Issue 1873963003: arithmetic mode with Sk4f (Closed)

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

Description

arithmetic mode with Sk4f After reading the SSE version, I figured I'd show off the new hotness a little. This'll get us SSE, NEON and portable implementations all in one easy to read package. Since we've been talking about it, it's worth noting the several ways this implementation is still not constant time: - short circuits on 0x00 and 0xff coverage; - floating point multiplication with untrusted k1-k4; if someone figures out a clever way to sometimes create denorm floats and sometimes not, there's a gigantic performance difference. I would hazard the pin is constant time now though. I've also fixed the lerp to lerp between dst and r instead of src and r. That can't have been right. curr/maxrss loops min median mean max stddev samples config bench 9/9 MB 1 25.5ms 25.5ms 25.5ms 25.5ms 0% ▃▁▁▃▂▇▅▆▇█ 8888 Xfermode_arithmetic_enforce_pm_aa 9/9 MB 1 24.1ms 24.2ms 24.2ms 24.3ms 0% ▄▃▁▄█▆▆█▃█ 8888 Xfermode_arithmetic_aa 9/9 MB 1 102ms 102ms 102ms 103ms 0% ▁▅▂▆▂█▂█▁▂ 8888 Xfermode_arithmetic_enforce_pm 9/9 MB 1 94.8ms 95.4ms 95.2ms 95.8ms 0% ▅▅▁▁▁▁▄▇█▇ 8888 Xfermode_arithmetic ~~~~> curr/maxrss loops min median mean max stddev samples config bench 9/9 MB 1 9.71ms 9.74ms 9.73ms 9.78ms 0% █▅▄▄▁▂▂▂▄▄ 8888 Xfermode_arithmetic_enforce_pm_aa 9/9 MB 1 9.5ms 9.57ms 9.58ms 9.7ms 1% ▂▁█▅▂▂▆▃▄▄ 8888 Xfermode_arithmetic_aa 9/9 MB 1 21.8ms 21.8ms 21.8ms 21.9ms 0% █▂▂▂▂▂▂▁▄▂ 8888 Xfermode_arithmetic_enforce_pm 9/9 MB 1 16.5ms 16.6ms 16.6ms 16.6ms 0% ▃█▁▁▄▄▁▁▆▅ 8888 Xfermode_arithmetic BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873963003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/d58f840650a6768b50d024247e2817ccbacd8a0d

Patch Set 1 #

Patch Set 2 : all together #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -55 lines) Patch
M src/effects/SkArithmeticMode.cpp View 1 2 chunks +29 lines, -55 lines 0 comments Download

Messages

Total messages: 21 (11 generated)
mtklein_C
4 years, 8 months ago (2016-04-08 22:12:48 UTC) #8
mtklein
(The raw nanobench times obviously vary from your code and machine, but the speedups are ...
4 years, 8 months ago (2016-04-08 22:15:31 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1873963003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1873963003/20001
4 years, 8 months ago (2016-04-08 22:15:54 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-08 22:29:25 UTC) #13
mtklein_C
On 2016/04/08 at 22:29:25, commit-bot wrote: > Dry run: This issue passed the CQ dry ...
4 years, 8 months ago (2016-04-08 22:34:55 UTC) #14
Stephen White
This is freakin' awesome! Even if the perf were slightly worse that my hand-rolled SSE2 ...
4 years, 8 months ago (2016-04-09 22:27:01 UTC) #15
Stephen White
Just to answer my own questions: this absolutely destroys my version (at least on this ...
4 years, 8 months ago (2016-04-09 23:45:58 UTC) #16
mtklein
On 2016/04/09 at 23:45:58, senorblanco wrote: > Just to answer my own questions: this absolutely ...
4 years, 8 months ago (2016-04-10 13:13:24 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1873963003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1873963003/20001
4 years, 8 months ago (2016-04-10 13:13:45 UTC) #19
commit-bot: I haz the power
4 years, 8 months ago (2016-04-10 13:23:33 UTC) #21
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://skia.googlesource.com/skia/+/d58f840650a6768b50d024247e2817ccbacd8a0d

Powered by Google App Engine
This is Rietveld 408576698