🔥 Remove unused code.

This commit is contained in:
Andrey Antukh 2021-12-28 22:44:53 +01:00 committed by Alonso Torres
parent 7b487e1bc3
commit f0e1bc1d59
2 changed files with 0 additions and 51 deletions

View file

@ -251,41 +251,3 @@
(not (debug-exclude-events (ptk/type s))))))
(rx/subs #(println "[stream]: " (ptk/repr-event %))))))
#_(defn ^:export bench-matrix
[]
(let [iterations 1000000
good (gmt/multiply (gmt/matrix 1 2 3 4 5 6)
(gmt/matrix 1 2 3 4 5 6))
k1 (perf/start)
_ (dotimes [_ iterations]
(when-not (= good (gmt/-old-multiply (gmt/matrix 1 2 3 4 5 6)
(gmt/matrix 1 2 3 4 5 6)))
(throw "ERROR")))
m1 (perf/measure k1)
k2 (perf/start)
_ (dotimes [_ iterations]
(when-not (= good (gmt/multiply (gmt/matrix 1 2 3 4 5 6)
(gmt/matrix 1 2 3 4 5 6)))
(throw "ERROR")))
m2 (perf/measure k2)
k3 (perf/start)
_ (dotimes [_ iterations]
(let [res (.concatenate (AffineTransform. 1 2 3 4 5 6)
(AffineTransform. 1 2 3 4 5 6))
res (gmt/matrix (.-m00_ res) (.-m10_ res) (.-m01_ res) (.-m11_ res) (.-m02_ res) (.-m12_ res))]
(when-not (= good res)
(throw "ERROR"))))
m3 (perf/measure k3)
]
(println "Clojure matrix. Total: " m1 " (" (/ m1 iterations) ")")
(println "Clojure matrix (NEW). Total: " m2 " (" (/ m2 iterations) ")")
(println "Affine transform (with new). Total: " m3 " (" (/ m3 iterations) ")")))