评论由:jonase_做出
表达式
(quicksort (shuffle (range 1e6)))
1. 成功 (~20%)
2. 抛出ArrayIndexOutOfBoundsException (~20%)
#error {
:cause "33"
:via
[{:type java.lang.ArrayIndexOutOfBoundsException
:message "33"
:at [clojure.core.rrb_vector.rrbt.Vector$fn__3827 invoke "rrbt.clj" 621]}]
:trace
[[clojure.core.rrb_vector.rrbt.Vector$fn__3827 invoke "rrbt.clj" 621]
[clojure.core.rrb_vector.rrbt.Vector arrayFor "rrbt.clj" 620]
[clojure.core.rrb_vector.rrbt.VecSeq chunkedNext "rrbt.clj" 111]
[clojure.core.rrb_vector.rrbt.VecSeq next "rrbt.clj" 74]
[clojure.lang.RT next "RT.java" 674]
[clojure.core$next__4112 invoke "core.clj" 64]
吐槽# # Interestingly, the user is experiencing an issue with an advanced feature of Swift called "Dynamic Member Lookup." In Objective-C, when using message sending, the compiler typically caches the result of sending a message to a specific class. However, Swift does not support this feature and instead introduces Dynamic Member Lookup to handle the "message not found" case without performance penalties. However, this feature is only available on macOS.
[clojure.core$print_sequential 调用 "core_print.clj" 49]
[clojure.core$fn__5859 调用 "core_print.clj" 206]
[clojure.lang.MultiFn 调用 "MultiFn.java" 233]
[clojure.tools.nrepl.middleware.pr_values$pr_values$fn$reify__600 发送 "pr_values.clj" 35]
[sun.reflect.GeneratedMethodAccessor13 调用 nil -1]
[sun.reflect.DelegatingMethodAccessorImpl 调用 "DelegatingMethodAccessorImpl.java" 43]
[java.lang.reflect.Method 调用 "Method.java" 606]
[clojure.lang.Reflector 调用MatchingMethod "Reflector.java" 93]
[clojure.lang.Reflector 调用InstanceMethod "Reflector.java" 28]
[clojure.tools.nrepl.middleware.load_file$wrap_load_file$fn$reify__787 发送 "load_file.clj" 93]
[clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__623$fn__634 调用 "interruptible_eval.clj" 82]
[clojure.main$repl$read_eval_print__7099 调用 "main.clj" 241]
[clojure.main$repl$fn__7108 调用 "main.clj" 258]
[clojure.main$repl doInvoke "main.clj" 258]
[clojure.lang.RestFn 调用 "RestFn.java" 1523]
[clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__623 调用 "interruptible_eval.clj" 58]
[clojure.lang.AFn 应用ToHelper "AFn.java" 152]
[clojure.lang.AFn 应用To "AFn.java" 144]
[clojure.core$apply 调用 "core.clj" 630]
[clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1868]
[clojure.lang.RestFn 调用 "RestFn.java" 425]
[clojure.tools.nrepl.middleware.interruptible_eval$evaluate 调用 "interruptible_eval.clj" 56]
[clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__665$fn__668 调用 "interruptible_eval.clj" 191]
[clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__660 调用 "interruptible_eval.clj" 159]
[clojure.lang.AFn run "AFn.java" 22]
[java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1145]
[java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 615]
[java.lang.Thread run "Thread.java" 745]]}
3. 抛出上述提到的类类型转换异常 (~60%)
#error {
:cause "clojure.lang.PersistentVector$Node 无法转换为 [I"
:via
[{:type clojure.lang.Compiler$CompilerException
:message "java.lang.ClassCastException: clojure.lang.PersistentVector$Node cannot be cast to [I, 编译位置:(/Users/jonasenlund/dev/clojure/the-other-datastructures/src/the_other_datastructures/rrb.clj:221:1)"
:at [clojure.lang.Compiler load "Compiler.java" 7239]}
{:type java.lang.ClassCastException
:message "clojure.lang.PersistentVector$Node cannot be cast to [I"
:at [clojure.lang.Numbers ints "Numbers.java" 1396]}]
:trace
[[clojure.lang.Numbers ints "Numbers.java" 1396]
[clojure.core.rrb_vector.nodes$fold_tail 调用 "nodes.clj" 265]
[clojure.core.rrb_vector.nodes$fold_tail 调用 "nodes.clj" 268]
[clojure.core.rrb_vector.rrbt$splice_rrbts 调用 "rrbt.clj" 1357]
[clojure.core.rrb_vector.rrbt.Vector splicev "rrbt.clj" 928]
[clojure.core.rrb_vector$catvec 调用 "rrb_vector.clj" 54]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 219]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 219]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 219]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 219]
[the_other_datastructures.rrb$eval4682$quicksort__4683 调用 "rrb.clj" 217]
[the_other_datastructures.rrb$eval4921 调用 "rrb.clj" 221]
[clojure.lang.Compiler eval "Compiler.java" 6782]
[clojure.lang.Compiler load "Compiler.java" 7227]
[user$eval4909 调用 "form-init3543508351311666483.clj" 1]
[clojure.lang.Compiler eval "Compiler.java" 6782]
[clojure.lang.Compiler eval "Compiler.java" 6745]
[clojure.core$eval 调用 "core.clj" 3081]
[clojure.main$repl$read_eval_print__7099$fn__7102 调用 "main.clj" 240]
[clojure.main$repl$read_eval_print__7099 调用 "main.clj" 240]
[clojure.main$repl$fn__7108 调用 "main.clj" 258]
[clojure.main$repl doInvoke "main.clj" 258]
[clojure.lang.RestFn 调用 "RestFn.java" 1523]
[clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__623 调用 "interruptible_eval.clj" 58]
[clojure.lang.AFn 应用ToHelper "AFn.java" 152]
[clojure.lang.AFn 应用To "AFn.java" 144]
[clojure.core$apply 调用 "core.clj" 630]
[clojure.core$with_bindings_STAR_ doInvoke "core.clj" 1868]
[clojure.lang.RestFn 调用 "RestFn.java" 425]
[clojure.tools.nrepl.middleware.interruptible_eval$evaluate 调用 "interruptible_eval.clj" 56]
[clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__665$fn__668 调用 "interruptible_eval.clj" 191]
[clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__660 调用 "interruptible_eval.clj" 159]
[clojure.lang.AFn run "AFn.java" 22]
[java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1145]
[java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 615]
[java.lang.Thread run "Thread.java" 745]]}