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

Issue 976493002: Add SSSE3 implementation for SkPMFloat, with faster get() and set(). (Closed)

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

Description

Add SSSE3 implementation for SkPMFloat, with faster get() and set(). With SSSE3, we can use the Swiss Army Knife byte shuffler pshufb, a.k.a. _mm_shuffle_epi8(), to jump directly between 32 and 128 bits. In microbench isolation, this looks like an additional 10-15% speedup: SkPMFloat_get: 2.35ns -> 1.98ns SkPMFloat_clamp: 2.35ns -> 2.18ns Before this CL, get() and clamp() were identical code. The _get benchmark improves because both set() and get() become faster; the _clamp benchmark shows the improvement from set() getting faster with clamp() staying the same. BUG=skia: Committed: https://skia.googlesource.com/skia/+/8c7ba092a68836c5db95c2a80b74d4f9cb475cc2

Patch Set 1 #

Patch Set 2 : leave a note about SSE 4.1 #

Patch Set 3 : rediff #

Patch Set 4 : remove the note for now #

Patch Set 5 : rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -1 line) Patch
M src/core/SkPMFloat.h View 2 1 chunk +3 lines, -1 line 0 comments Download
A src/opts/SkPMFloat_SSSE3.h View 2 3 1 chunk +38 lines, -0 lines 4 comments Download

Messages

Total messages: 8 (3 generated)
mtklein_C
5 years, 9 months ago (2015-03-03 17:08:02 UTC) #2
msarett
lgtm https://codereview.chromium.org/976493002/diff/80001/src/opts/SkPMFloat_SSSE3.h File src/opts/SkPMFloat_SSSE3.h (right): https://codereview.chromium.org/976493002/diff/80001/src/opts/SkPMFloat_SSSE3.h#newcode17 src/opts/SkPMFloat_SSSE3.h:17: _mm_store_ps(fColor, _mm_cvtepi32_ps(fix8_32)); As far as instructions, it looks ...
5 years, 9 months ago (2015-03-04 18:06:12 UTC) #3
mtklein
https://codereview.chromium.org/976493002/diff/80001/src/opts/SkPMFloat_SSSE3.h File src/opts/SkPMFloat_SSSE3.h (right): https://codereview.chromium.org/976493002/diff/80001/src/opts/SkPMFloat_SSSE3.h#newcode17 src/opts/SkPMFloat_SSSE3.h:17: _mm_store_ps(fColor, _mm_cvtepi32_ps(fix8_32)); On 2015/03/04 18:06:12, msarett wrote: > As ...
5 years, 9 months ago (2015-03-04 18:10:24 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/976493002/80001
5 years, 9 months ago (2015-03-04 18:11:36 UTC) #7
commit-bot: I haz the power
5 years, 9 months ago (2015-03-04 18:18:12 UTC) #8
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/8c7ba092a68836c5db95c2a80b74d4f9cb475cc2

Powered by Google App Engine
This is Rietveld 408576698