storm icon indicating copy to clipboard operation
storm copied to clipboard

deep hash code for byte[] and other array in tuple

Open xiaokang opened this issue 12 years ago • 3 comments

This PR is for #245 to fix the default hash code for byte[] and other array in tuple.

xiaokang avatar Nov 14 '13 09:11 xiaokang

Made a few comments on the code.

nathanmarz avatar Nov 14 '13 10:11 nathanmarz

Thanks @nathanmarz 's comments. The first and second is easy to fix but I am not very sure about the third.

xiaokang avatar Nov 16 '13 10:11 xiaokang

I believe it will still box and unbox even when you use unchecked-add-int because it's wrapped in a function passed to reduce. I think it's worth trying to write that code in Java and see how the performance compares to the pure Clojure version. Alternatively, you can manually do a loop on the list – I believe Clojure will not box the bindings on the loop between iterations.

nathanmarz avatar Nov 16 '13 19:11 nathanmarz