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

Issue 181643004: Moved SuperFastHash function from base/hash.cc to base/third_party. (Closed)

Created:
6 years, 10 months ago by Matt Giuca
Modified:
6 years, 9 months ago
CC:
chromium-reviews, kalyank, erikwright+watch_chromium.org, sadrul, ben+ash_chromium.org, chrome-apps-syd-reviews_chromium.org, open-source-third-party-reviews_google.com
Visibility:
Public.

Description

Moved SuperFastHash function from base/hash.cc to base/third_party. This code was written by Paul Hsieh under a 3-clause BSD license. It belongs in third_party. I did not move the existing implementation, but re-downloaded the code from upstream: http://www.azillionmonkeys.com/qed/hash.html This version is formatted differently and is written in plain C, but it is identical to the version that was previously in hash.cc. Added LICENSE and README.chromium files, as well as adding license text to the top of superfasthash.cc, as required by checklicenses.py. BUG=347393 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254437

Patch Set 1 #

Total comments: 9

Patch Set 2 : Move SuperFastHash declaration to hash.cc and remove #ifdef __cplusplus. #

Total comments: 7

Patch Set 3 : One-line extern C declaration for compactness. #

Patch Set 4 : Respond to jln's comments. #

Total comments: 1

Patch Set 5 : Fix compile error (-Wsign-compare). #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -90 lines) Patch
M base/base.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M base/hash.h View 1 2 3 4 1 chunk +14 lines, -6 lines 4 comments Download
M base/hash.cc View 1 2 1 chunk +8 lines, -64 lines 0 comments Download
A + base/third_party/superfasthash/LICENSE View 1 chunk +20 lines, -20 lines 0 comments Download
A base/third_party/superfasthash/OWNERS View 1 chunk +2 lines, -0 lines 0 comments Download
A base/third_party/superfasthash/README.chromium View 1 chunk +29 lines, -0 lines 0 comments Download
A base/third_party/superfasthash/superfasthash.c View 1 chunk +84 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Matt Giuca
+open-source-third-party-reviews: Please review for compliance. Note that it passes checklicenses.py, which identifies the license as ...
6 years, 10 months ago (2014-02-27 02:56:08 UTC) #1
Matt Giuca
https://codereview.chromium.org/181643004/diff/20001/base/hash.cc File base/hash.cc (right): https://codereview.chromium.org/181643004/diff/20001/base/hash.cc#newcode10 base/hash.cc:10: return ::SuperFastHash(data, len); Note: This added indirection may introduce ...
6 years, 10 months ago (2014-02-27 03:14:09 UTC) #2
rvargas (doing something else)
LGTM. Thanks for doing this. https://codereview.chromium.org/181643004/diff/20001/base/hash.h File base/hash.h (right): https://codereview.chromium.org/181643004/diff/20001/base/hash.h#newcode13 base/hash.h:13: #ifdef __cplusplus Do we ...
6 years, 10 months ago (2014-02-27 04:11:20 UTC) #3
Matt Giuca
https://codereview.chromium.org/181643004/diff/20001/base/hash.h File base/hash.h (right): https://codereview.chromium.org/181643004/diff/20001/base/hash.h#newcode13 base/hash.h:13: #ifdef __cplusplus On 2014/02/27 04:11:20, rvargas wrote: > Do ...
6 years, 10 months ago (2014-02-27 04:24:09 UTC) #4
jln (very slow on Chromium)
Security review: This is a surprisingly painful 60 LOC. I think I'd be fine with ...
6 years, 10 months ago (2014-02-27 04:37:17 UTC) #5
Matt Giuca
Hi Julien, Thanks for a speedy security review! > This is a surprisingly painful 60 ...
6 years, 10 months ago (2014-02-27 05:25:29 UTC) #6
jln (very slow on Chromium)
lgtm for security https://chromiumcodereview.appspot.com/181643004/diff/40001/base/third_party/superfasthash/superfasthash.c File base/third_party/superfasthash/superfasthash.c (right): https://chromiumcodereview.appspot.com/181643004/diff/40001/base/third_party/superfasthash/superfasthash.c#newcode47 base/third_party/superfasthash/superfasthash.c:47: rem = len & 3; On ...
6 years, 9 months ago (2014-02-27 19:02:13 UTC) #7
brettw
base owners lgtm, I didn't check the details.
6 years, 9 months ago (2014-02-27 19:19:26 UTC) #8
Matt Giuca
Note: I have lgtm (via email) from legal.
6 years, 9 months ago (2014-02-28 03:45:38 UTC) #9
Matt Giuca
The CQ bit was checked by mgiuca@chromium.org
6 years, 9 months ago (2014-02-28 09:54:32 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mgiuca@chromium.org/181643004/50008
6 years, 9 months ago (2014-02-28 09:54:44 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-02-28 10:04:12 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg
6 years, 9 months ago (2014-02-28 10:04:13 UTC) #13
Matt Giuca
It's very strange that this compile error doesn't show itself in the tests (I re-ran ...
6 years, 9 months ago (2014-03-02 23:40:32 UTC) #14
Matt Giuca
The CQ bit was checked by mgiuca@chromium.org
6 years, 9 months ago (2014-03-03 00:01:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mgiuca@chromium.org/181643004/90001
6 years, 9 months ago (2014-03-03 00:02:13 UTC) #16
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-03 01:09:23 UTC) #17
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) app_list_unittests, ash_unittests, aura_unittests, cacheinvalidation_unittests, cc_unittests, check_deps, ...
6 years, 9 months ago (2014-03-03 01:09:24 UTC) #18
Matt Giuca
The CQ bit was checked by mgiuca@chromium.org
6 years, 9 months ago (2014-03-03 01:42:23 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mgiuca@chromium.org/181643004/90001
6 years, 9 months ago (2014-03-03 01:42:32 UTC) #20
commit-bot: I haz the power
Change committed as 254437
6 years, 9 months ago (2014-03-03 07:59:30 UTC) #21
Noel Gordon
https://codereview.chromium.org/181643004/diff/90001/base/hash.h File base/hash.h (left): https://codereview.chromium.org/181643004/diff/90001/base/hash.h#oldcode16 base/hash.h:16: // This is the hash used on WebCore/platform/stringhash Late ...
6 years, 9 months ago (2014-03-04 08:39:52 UTC) #22
Matt Giuca
https://codereview.chromium.org/181643004/diff/90001/base/hash.h File base/hash.h (left): https://codereview.chromium.org/181643004/diff/90001/base/hash.h#oldcode16 base/hash.h:16: // This is the hash used on WebCore/platform/stringhash On ...
6 years, 9 months ago (2014-03-04 23:47:31 UTC) #23
Noel Gordon
On 2014/03/04 23:47:31, Matt Giuca wrote: > But even having found it, I don't see ...
6 years, 9 months ago (2014-03-05 02:05:14 UTC) #24
Noel Gordon
6 years, 9 months ago (2014-03-05 02:21:17 UTC) #25
Message was sent while issue was closed.
On 2014/03/04 23:47:31, Matt Giuca wrote:

> Yeah, all correct. I was just trying to be quite clear about the behaviour but
> in hindsight, maybe it would have been easier to say "hash of a block of
> memory". Do you think it's worth updating this comment?

Ideally, comments should be accurate/useful if we add them.  It's hard to
write good comments, in general.  I think it's worth fixing.  I'd maybe
add a unit test to show that internal null's don't matter

 "null\0 containing\0 test \0 string\0"

Anyho, thanks for doing this work.

Powered by Google App Engine
This is Rietveld 408576698