MCPcopy Index your code
hub / github.com/clojure/clojure / hashUnencodedChars

Method hashUnencodedChars

src/jvm/clojure/lang/Murmur3.java:72–92  ·  view source on GitHub ↗
(CharSequence input)

Source from the content-addressed store, hash-verified

70}
71
72public static int hashUnencodedChars(CharSequence input){
73 int h1 = seed;
74
75 // step through the CharSequence 2 chars at a time
76 for(int i = 1; i < input.length(); i += 2)
77 {
78 int k1 = input.charAt(i - 1) | (input.charAt(i) << 16);
79 k1 = mixK1(k1);
80 h1 = mixH1(h1, k1);
81 }
82
83 // deal with any remaining characters
84 if((input.length() & 1) == 1)
85 {
86 int k1 = input.charAt(input.length() - 1);
87 k1 = mixK1(k1);
88 h1 ^= k1;
89 }
90
91 return fmix(h1, 2 * input.length());
92}
93
94public static int mixCollHash(int hash, int count){
95 int h1 = seed;

Callers 1

hasheqMethod · 0.95

Calls 4

mixK1Method · 0.95
mixH1Method · 0.95
fmixMethod · 0.95
lengthMethod · 0.65

Tested by

no test coverage detected