|
|
|
|
|
by codahale
6228 days ago
|
|
I just ported it to Java. It took me five minutes. It's 40 lines of C++, most of which are of the `k *= m;` variety. You literally paste in the C++, fix the type declarations, and replace the point increment looping with standard indexed array iteration. Remember to replace `const` with `final` and you're done. Using JNI for a high-speed hash function makes only slightly more sense than putting a SOAP interface on it. |
|
You didn't port this to Java, you ported a broken algorithm to Java. Way to go, though.