You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "nickva (via GitHub)" <gi...@apache.org> on 2023/05/04 06:35:15 UTC

[GitHub] [couchdb] nickva opened a new pull request, #4570: Try xxHash

nickva opened a new pull request, #4570:
URL: https://github.com/apache/couchdb/pull/4570

   https://cyan4973.github.io/xxHash/
   
   ```
   % make
   % erl -pa ebin
   
   1> l(exxhash).
   {module,exxhash}
   
   4> Payload = crypto:strong_rand_bytes(1024*1024*100).
   <<3,24,111,1,194,207,162,224,207,181,240,217,215,218,218,
     205,158,34,105,37,113,104,124,155,61,3,179,30,67,...>>
   
   5> timer:tc(fun() -> erlang:md5(Payload) end).
   {712241,
    <<236,134,158,103,156,236,124,91,106,251,186,60,167,244,
      30,53>>}
   
   6> timer:tc(fun() -> crypto:hash(md5, Payload) end).
   {190945,
    <<236,134,158,103,156,236,124,91,106,251,186,60,167,244,
      30,53>>}
   
   7> timer:tc(fun() -> exxhash:xxhash128(Payload) end).
   {9952,
    <<24,239,152,98,18,100,83,212,174,157,72,241,149,121,161,
      122>>}
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva merged pull request #4570: Use xxHash

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva merged PR #4570:
URL: https://github.com/apache/couchdb/pull/4570


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on pull request #4570: Try xxHash

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on PR #4570:
URL: https://github.com/apache/couchdb/pull/4570#issuecomment-1535133183

   Thanks, @iilyak!
   
   I looked at xxh3 but since we don't have rust in our buildchain already didn't want to bring it in just for xxh3_128. The C one doesn't use dirty schedulers and doesn't implement the 128 bit variant which is the one we need.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on a diff in pull request #4570: Use xxHash

Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #4570:
URL: https://github.com/apache/couchdb/pull/4570#discussion_r1186276855


##########
src/exxhash/LICENSE.exxhash:
##########
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/

Review Comment:
   Good point. It's for the NIF itself vs (xxHash header). But we don't include apps separately any longer so the top level LICENSE would do there. I'll remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] davisp commented on a diff in pull request #4570: Use xxHash

Posted by "davisp (via GitHub)" <gi...@apache.org>.
davisp commented on code in PR #4570:
URL: https://github.com/apache/couchdb/pull/4570#discussion_r1186274451


##########
src/exxhash/LICENSE.exxhash:
##########
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/

Review Comment:
   What's this license from/for?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] iilyak commented on pull request #4570: Try xxHash

Posted by "iilyak (via GitHub)" <gi...@apache.org>.
iilyak commented on PR #4570:
URL: https://github.com/apache/couchdb/pull/4570#issuecomment-1534932030

   xxhash Excellent find!!! 
   
   Just for awareness I also found
   
   - https://github.com/farhadi/xxh3 - NIF written in rust
   - https://github.com/pierreis/erlang-xxhash - NIF written in C


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org