-
-
Save kindlychung/455d586af55bb7262407 to your computer and use it in GitHub Desktop.
This file contains 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
(defn array-sum [^ints xs] | |
(loop [index 0 acc 0] | |
(if (< index (alength xs)) | |
(recur (unchecked-inc index) (+ acc (aget xs index))) | |
acc))) | |
(time (array-sum (into-array (range 400)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CompilerException java.lang.ClassCastException: [Ljava.lang.Long; cannot be cast to [I, compiling:(/Users/kaiyin/personal_config_bin_files/workspace/cina/src/cina/ref_types.clj:1:24)