diff --git a/dev/benchmarks.clj b/dev/benchmarks.clj index 9cf119e..648d525 100644 --- a/dev/benchmarks.clj +++ b/dev/benchmarks.clj @@ -1,25 +1,8 @@ (ns benchmarks - (:use jordanlewis.data.union-find) + (:use jordanlewis.data.union-find + dev-utils) (:require [criterium.core :refer [bench quick-bench]])) -(defn make-stars [stars points] - (for [a (range stars) - b (range points) - :let [b (+ stars (* a points) b)]] - [a b (str b)])) - -(defn partition-graph [uf stars points -conj -union] - (reduce - (fn [uf [a b c]] - (-> uf - (-conj a) - (-conj b) - (-conj c) - (-union a b) - (-union b c))) - uf - (make-stars stars points))) - (comment (quick-bench (partition-graph (union-find) 10 100 conj union))