aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/UtilsTest.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-15 15:12:29 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-15 15:12:29 +0000
commit921374d4cc7ee2bf07be0d778ce4ce7414909534 (patch)
tree009aca33c4314ca11f0609f56b8fa02503a95f22 /tests/UtilsTest.cpp
parenta2b793c4d159ccaffbf921a0339096f2c9c35560 (diff)
for scalar==float, tis faster to always to MIN and MAX, than to put an ELSE
betwixt them. if (x < min) min = x; else if (x > max) max = x; This expression forces the compiler to know if the min expression executed, and insert a conditional jump before the max. Slow. if (x < min) min = x; if (x > max) max = x; This version allows the compiler to emitt MINSS and MAXSS unconditionally, giving us a loop with zero branches inside. git-svn-id: http://skia.googlecode.com/svn/trunk@3939 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/UtilsTest.cpp')
0 files changed, 0 insertions, 0 deletions