aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/ChecksumBench.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-11-12 15:44:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-12 15:44:09 -0800
commit1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac (patch)
tree8ae77daf61c105dc68e53a4aa18b2984be2aeb2e /bench/ChecksumBench.cpp
parentc94cd7cc01b655b7f4289537962c36a4ee8dd63e (diff)
Switch uses of SkChecksum::Compute to Murmur3.
SkChecksum::Compute is a very, very poorly distributed hash function. This replaces all remaining uses with Murmur3. The only interesting stuff is in src/gpu. BUG=skia: Review URL: https://codereview.chromium.org/1436973003
Diffstat (limited to 'bench/ChecksumBench.cpp')
-rw-r--r--bench/ChecksumBench.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/bench/ChecksumBench.cpp b/bench/ChecksumBench.cpp
index a2c282435e..92e7da662f 100644
--- a/bench/ChecksumBench.cpp
+++ b/bench/ChecksumBench.cpp
@@ -13,7 +13,6 @@
#include "SkTemplates.h"
enum ChecksumType {
- kChecksum_ChecksumType,
kMD5_ChecksumType,
kSHA1_ChecksumType,
kMurmur3_ChecksumType,
@@ -42,7 +41,6 @@ public:
protected:
const char* onGetName() override {
switch (fType) {
- case kChecksum_ChecksumType: return "compute_checksum";
case kMD5_ChecksumType: return "compute_md5";
case kSHA1_ChecksumType: return "compute_sha1";
case kMurmur3_ChecksumType: return "compute_murmur3";
@@ -53,12 +51,6 @@ protected:
void onDraw(int loops, SkCanvas*) override {
switch (fType) {
- case kChecksum_ChecksumType: {
- for (int i = 0; i < loops; i++) {
- volatile uint32_t result = SkChecksum::Compute(fData, sizeof(fData));
- sk_ignore_unused_variable(result);
- }
- } break;
case kMD5_ChecksumType: {
for (int i = 0; i < loops; i++) {
SkMD5 md5;
@@ -91,7 +83,6 @@ private:
///////////////////////////////////////////////////////////////////////////////
-DEF_BENCH( return new ComputeChecksumBench(kChecksum_ChecksumType); )
DEF_BENCH( return new ComputeChecksumBench(kMD5_ChecksumType); )
DEF_BENCH( return new ComputeChecksumBench(kSHA1_ChecksumType); )
DEF_BENCH( return new ComputeChecksumBench(kMurmur3_ChecksumType); )