DescriptionSkColorCubeFilter_opts: start with a statically-initializable zero.
SkPMFloat(0) and SkPMFloat(0,0,0,0) end up with the same value,
but the first goes through math to get there. The second is a lot more
transparent to the compiler, and should compile all the way down to
just `xorps xmmN,xmmN` or even be optimized away.
Didn't measure any additional benefit from hoisting the zero outside
the loop and writing `SkPMFloat color = zero;`.
Perf win is <2%.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/435af2f736c85c3274a0c6760a3523810750d237
Patch Set 1 #
Total comments: 1
Messages
Total messages: 10 (2 generated)
|