Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1756)

Issue 14054012: SkBitmapHasher: use 64-bit-truncated MD5 instead of 64-bit CityHash (Closed)

Created:
7 years, 8 months ago by epoger
Modified:
7 years, 7 months ago
Reviewers:
bungeman-skia, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

SkBitmapHasher: use 64-bit-truncated MD5 instead of 64-bit CityHash BUG=https://code.google.com/p/skia/issues/detail?id=1257 (if we change our mind within the next few days, we can toggle the BITMAPHASHER_USES_TRUNCATED_MD5 #ifdef ; at some point, we'll remove that option so we can delete our CityHash implementation entirely) R=bungeman@google.com Committed: https://code.google.com/p/skia/source/detail?r=8992

Patch Set 1 #

Total comments: 1

Patch Set 2 : add_BITMAPHASHER_USES_TRUNCATED_MD5 #

Total comments: 2

Patch Set 3 : add_algorithm_type_to_timing_report #

Total comments: 1

Patch Set 4 : remove_timing_printfs #

Patch Set 5 : sync_to_r8985 #

Patch Set 6 : update_gm_selftest_results #

Total comments: 3

Patch Set 7 : mandate_little_endian #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -50 lines) Patch
M gm/tests/outputs/compared-against-different-pixels-images/output-expected/json-summary.txt View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/compared-against-different-pixels-json/output-expected/json-summary.txt View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M gm/tests/outputs/compared-against-identical-bytes-images/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/compared-against-identical-bytes-json/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/compared-against-identical-pixels-images/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/compared-against-identical-pixels-json/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/ignore-expectations-mismatch/output-expected/json-summary.txt View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/intentionally-skipped-tests/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M gm/tests/outputs/no-readpath/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M gm/tests/outputs/nonverbose/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M gm/tests/outputs/pipe-playback-failure/output-expected/json-summary.txt View 1 2 3 4 5 1 chunk +6 lines, -6 lines 0 comments Download
M include/core/SkEndian.h View 1 2 3 4 5 6 2 chunks +45 lines, -1 line 1 comment Download
M src/utils/SkBitmapHasher.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/utils/SkBitmapHasher.cpp View 1 2 3 4 5 6 3 chunks +27 lines, -5 lines 0 comments Download
M tests/BitmapHasherTest.cpp View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
epoger
https://codereview.chromium.org/14054012/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/14054012/diff/1/gm/gmmain.cpp#newcode41 gm/gmmain.cpp:41: #define EPOGER_TEST patchset 1 adds timing reports, and disables ...
7 years, 8 months ago (2013-04-24 17:07:07 UTC) #1
epoger
https://codereview.chromium.org/14054012/diff/3001/src/utils/SkBitmapHasher.h File src/utils/SkBitmapHasher.h (right): https://codereview.chromium.org/14054012/diff/3001/src/utils/SkBitmapHasher.h#newcode14 src/utils/SkBitmapHasher.h:14: #define BITMAPHASHER_USES_TRUNCATED_MD5 patchset 2 changes SkBitmapHasher to use a ...
7 years, 8 months ago (2013-04-24 17:30:00 UTC) #2
epoger
https://codereview.chromium.org/14054012/diff/7001/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.chromium.org/14054012/diff/7001/gm/gmmain.cpp#newcode1995 gm/gmmain.cpp:1995: printf("EPOGER_TEST timings with %s algorithm: %d msecs before summary ...
7 years, 8 months ago (2013-04-24 17:36:57 UTC) #3
epoger
Here are the timing results from running out/Debug/gm on my Ubiquity instance at patchset 3, ...
7 years, 8 months ago (2013-04-24 17:46:20 UTC) #4
epoger
Hey Ben- I'm not actually looking for a code review here, but I wanted you ...
7 years, 8 months ago (2013-04-24 18:13:52 UTC) #5
bungeman-skia
Some random thoughts. 1. Is 64 bits enough? We're somewhat avoiding the birthday problem here ...
7 years, 8 months ago (2013-04-24 19:33:17 UTC) #6
epoger
On 2013/04/24 19:33:17, bungeman1 wrote: > Some random thoughts. Thanks for writing down those thoughts, ...
7 years, 8 months ago (2013-04-24 23:32:49 UTC) #7
epoger
Here are the timing results of truncated-MD5 vs CityHash from the bots. On our slowest ...
7 years, 8 months ago (2013-04-24 23:47:54 UTC) #8
bungeman-skia
On 2013/04/24 23:32:49, epoger wrote: > On 2013/04/24 19:33:17, bungeman1 wrote: > > Some random ...
7 years, 8 months ago (2013-04-25 15:39:54 UTC) #9
bungeman-skia
> e^((-n^2)/(2*N)) . For N=2^64 and n=10^9 this gives p~=0.000002%. For n=10^9 The 'n=10^9' here ...
7 years, 8 months ago (2013-04-25 15:42:47 UTC) #10
epoger
Wow, thanks for the math. On 2013/04/25 15:39:54, bungeman1 wrote: > Third, the probability of ...
7 years, 8 months ago (2013-04-25 16:11:37 UTC) #11
epoger
Ben- it's ready for review at patchset 6. https://codereview.chromium.org/14054012/diff/25001/gm/tests/outputs/compared-against-different-pixels-images/output-expected/json-summary.txt File gm/tests/outputs/compared-against-different-pixels-images/output-expected/json-summary.txt (right): https://codereview.chromium.org/14054012/diff/25001/gm/tests/outputs/compared-against-different-pixels-images/output-expected/json-summary.txt#newcode5 gm/tests/outputs/compared-against-different-pixels-images/output-expected/json-summary.txt:5: "bitmap-cityhash" ...
7 years, 7 months ago (2013-05-03 14:49:25 UTC) #12
bungeman-skia
https://codereview.chromium.org/14054012/diff/25001/src/utils/SkBitmapHasher.cpp File src/utils/SkBitmapHasher.cpp (right): https://codereview.chromium.org/14054012/diff/25001/src/utils/SkBitmapHasher.cpp#newcode57 src/utils/SkBitmapHasher.cpp:57: *result = *((SkHashDigest *)&digest); While I did write this, ...
7 years, 7 months ago (2013-05-03 15:21:00 UTC) #13
epoger
https://codereview.chromium.org/14054012/diff/25001/src/utils/SkBitmapHasher.cpp File src/utils/SkBitmapHasher.cpp (right): https://codereview.chromium.org/14054012/diff/25001/src/utils/SkBitmapHasher.cpp#newcode57 src/utils/SkBitmapHasher.cpp:57: *result = *((SkHashDigest *)&digest); On 2013/05/03 15:21:00, bungeman1 wrote: ...
7 years, 7 months ago (2013-05-03 16:28:00 UTC) #14
bungeman-skia
The hash changes lgtm, adding reed to review the endian change.
7 years, 7 months ago (2013-05-03 17:16:22 UTC) #15
reed1
seems good. can we write a unittest for the endian swappers? Perhaps outside/after this CL...
7 years, 7 months ago (2013-05-03 17:22:18 UTC) #16
epoger
Committed patchset #7 manually as r8992 (presubmit successful).
7 years, 7 months ago (2013-05-03 17:35:45 UTC) #17
epoger
7 years, 7 months ago (2013-05-03 17:36:39 UTC) #18
Message was sent while issue was closed.
On 2013/05/03 17:22:18, reed1 wrote:
> seems good. can we write a unittest for the endian swappers? Perhaps
> outside/after this CL...

Filed https://code.google.com/p/skia/issues/detail?id=1280 ('create unittests
for SkEndian.h')... we don't even have unittests for any of the (existing)
endian swappers.

Powered by Google App Engine
This is Rietveld 408576698