aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-28 22:47:26 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-28 22:47:26 +0000
commitdcba9931a3da43c0f8aa1b2233b3301f9732ebcc (patch)
tree931be4beee6824a5c7b8ba4e3f0864210d7ea6a7 /bench
parent793ddd994aae5a78b13fdbe24a6755085f7998cd (diff)
Add sk_memcpy32 to Memcpy bench.
The bench predates the implementation in SkUtils, but now that we've got it of course we want to measure our actual implementation. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/302763006 git-svn-id: http://skia.googlecode.com/svn/trunk@14942 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r--bench/MemcpyBench.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/bench/MemcpyBench.cpp b/bench/MemcpyBench.cpp
index aec2a4774d..3fd6dcbcfb 100644
--- a/bench/MemcpyBench.cpp
+++ b/bench/MemcpyBench.cpp
@@ -8,6 +8,7 @@
#include "SkBenchmark.h"
#include "SkRandom.h"
#include "SkTemplates.h"
+#include "SkUtils.h"
template <typename Memcpy32>
class Memcpy32Bench : public SkBenchmark {
@@ -147,6 +148,13 @@ BENCH(memcpy32_sse2_unalign, 1000)
BENCH(memcpy32_sse2_unalign, 10000)
BENCH(memcpy32_sse2_unalign, 100000)
+// Test our chosen best, from SkUtils.h
+BENCH(sk_memcpy32, 10)
+BENCH(sk_memcpy32, 100)
+BENCH(sk_memcpy32, 1000)
+BENCH(sk_memcpy32, 10000)
+BENCH(sk_memcpy32, 100000)
+
#endif // SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
#undef BENCH