ClojureCLR 1.13.0-alpha7 is released. Matches changes in Clojure (JVM) 1.13.0-alpha7. In addition, specific to ClojureCLR, one significant change and one note. I've started a benchmarking/profiling effort. I'm using AI coding tools to do the investigation. The goal is to look for inefficient coding in ClojureCLR C# code directly, and to look at performance relative to ClojureJVM. For the latter effort, there is significant energy devoted to determining where the problems are are due to ClojureCLR as opposed to CLR vs JVM differences. That last piece is extremely challenging. And mostly has resulted in ruling out a lot of hypotheses. The one definite outcome is determining that Array.Clone on the CLR significantly underperforms Array.Clone on the JVM. This operation occurs in 13 places across PersistentVector, PersistentHashArray, and PersistentHashMap. Speedups based on instruction counts are 25-50%, times similar. 100ns here, 100ns there, eventually you're talking real milliseconds. So you might not notice. But I feel better. (Still slower than ClojureJVM, but the difference seems to be CLR vs JVM, probably in allocation, GC write barriers, barrier-aware moves and array zeroing. Eleven days of measurements did not yield a conclusion.) There is another ClojureCLR user who also has started a benchmarking effort and has had some successes. I'm waiting to connect with him on the details. These efforts will be ongoing. NOTE: .NET 11 brings some changes that surface in ClojureCLR. Some are good: the runtime async is a win and already available in ClojureCLR. Some just catch you.
(unchecked-short Double/MaxValue) ;; => -1 (.NET 10)
(unchecked-short Double/MaxValue) ;; => -1 (.NET 11, various preview releases I've been using)
(unchecked-short Double/MaxValue) ;; => 32767 (.NET 11 RC1, just installed)
Explanation (from various MS docs):
“In .NET 11, unchecked floating‑point conversions to sbyte, byte, short, ushort, and char now have saturating behavior at the destination type’s bounds.”
“Values that are too small or too large are set to the destination type’s minimum or maximum value, respectively.”To see improved performance, for (say) honeysql, for Clojure/JVM I type clojure -M:test:runner. I there a similar incantation for ClojureCLR under someones belt?