Last active
March 26, 2023 17:25
-
-
Save methylene/8420414 to your computer and use it in GitHub Desktop.
murmur hash in clojure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def murmur | |
(let [m (com.google.common.hash.Hashing/murmur3_128)] | |
(fn ^Long [^String s] | |
(-> (doto (.newHasher m) | |
(.putString s com.google.common.base.Charsets/UTF_8)) | |
(.hash) | |
(.asLong))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[com.google.guava/guava "15.0"]