A few notes on branch prediction and microbenchmarking Clojure comparisons
There are times when you need to do a large number of comparison operations, for example when implementing a sort or a tree structure. Clojure has provided a helpful core function to compare items that implement the Comparable
interface:
(compare 2 5)
;; => -1