aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/ChecksumBench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bench/ChecksumBench.cpp')
-rw-r--r--bench/ChecksumBench.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/bench/ChecksumBench.cpp b/bench/ChecksumBench.cpp
index 4c2ac1a396..f84cd3d3bc 100644
--- a/bench/ChecksumBench.cpp
+++ b/bench/ChecksumBench.cpp
@@ -7,13 +7,14 @@
#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkChecksum.h"
+#include "SkOpts.h"
#include "SkMD5.h"
#include "SkRandom.h"
#include "SkTemplates.h"
enum ChecksumType {
kMD5_ChecksumType,
- kMurmur3_ChecksumType,
+ kHash_ChecksumType,
};
class ComputeChecksumBench : public Benchmark {
@@ -40,7 +41,7 @@ protected:
const char* onGetName() override {
switch (fType) {
case kMD5_ChecksumType: return "compute_md5";
- case kMurmur3_ChecksumType: return "compute_murmur3";
+ case kHash_ChecksumType: return "compute_hash";
default: SK_ABORT("Invalid Type"); return "";
}
@@ -56,9 +57,9 @@ protected:
md5.finish(digest);
}
} break;
- case kMurmur3_ChecksumType: {
+ case kHash_ChecksumType: {
for (int i = 0; i < loops; i++) {
- volatile uint32_t result = SkChecksum::Murmur3(fData, sizeof(fData));
+ volatile uint32_t result = SkOpts::hash(fData, sizeof(fData));
sk_ignore_unused_variable(result);
}
}break;
@@ -73,4 +74,4 @@ private:
///////////////////////////////////////////////////////////////////////////////
DEF_BENCH( return new ComputeChecksumBench(kMD5_ChecksumType); )
-DEF_BENCH( return new ComputeChecksumBench(kMurmur3_ChecksumType); )
+DEF_BENCH( return new ComputeChecksumBench(kHash_ChecksumType); )