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

Issue 2150343002: Add a bench to measure the best way to pack from int to uint16_t with SSE. (Closed)

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

Description

Add a bench to measure the best way to pack from int to uint16_t with SSE. I measured relative runtimes on my laptop: pack_int_uint16_t_ss… 1036 …e41 1x …se3 1.01x …e2_b 3.01x …e2_a 3.02x I've run into Clang problems with the actual _mm_packus_epi32 instruction, I think, so I'm going to exercise a little cowardice and leave that option disabled for now. The ssse3 version probably looks a little faster than it will be in practice. We'll usually need to load its mask, which here is hoisted out of the bench loop. The two sse2 variants are close enough in speed that I'm tie breaking them on other concerns: the <<16, >>16 version doesn't need any scratch registers or to load any constants, so it wins. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2150343002 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot Committed: https://skia.googlesource.com/skia/+/036e1831e05ae3a6ec9bcd30cb24f6b1a49a3541

Patch Set 1 #

Patch Set 2 : naming #

Patch Set 3 : typo #

Patch Set 4 : static -> anonymous #

Patch Set 5 : merge #

Total comments: 1

Patch Set 6 : so tired of this MSVC... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -16 lines) Patch
A bench/pack_int_uint16_t_Bench.cpp View 1 2 3 4 5 1 chunk +93 lines, -0 lines 0 comments Download
M src/opts/SkNx_sse.h View 1 2 3 4 2 chunks +13 lines, -16 lines 0 comments Download

Messages

Total messages: 23 (19 generated)
mtklein_C
4 years, 5 months ago (2016-07-15 14:24:21 UTC) #13
msarett
lgtm https://codereview.chromium.org/2150343002/diff/80001/src/opts/SkNx_sse.h File src/opts/SkNx_sse.h (right): https://codereview.chromium.org/2150343002/diff/80001/src/opts/SkNx_sse.h#newcode328 src/opts/SkNx_sse.h:328: // TODO: This seems to be causing code ...
4 years, 5 months ago (2016-07-15 14:29:15 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2150343002/100001
4 years, 5 months ago (2016-07-15 14:32:24 UTC) #21
commit-bot: I haz the power
4 years, 5 months ago (2016-07-15 14:45:57 UTC) #23
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://skia.googlesource.com/skia/+/036e1831e05ae3a6ec9bcd30cb24f6b1a49a3541

Powered by Google App Engine
This is Rietveld 408576698