0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 15:51:37 -05:00

🔥 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

@ -62,19 +62,6 @@
([m1 m2 & others]
(reduce multiply (multiply m1 m2) others)))
(defn -old-multiply
([{m1a :a m1b :b m1c :c m1d :d m1e :e m1f :f}
{m2a :a m2b :b m2c :c m2d :d m2e :e m2f :f}]
(Matrix.
(+ (* m1a m2a) (* m1c m2b))
(+ (* m1b m2a) (* m1d m2b))
(+ (* m1a m2c) (* m1c m2d))
(+ (* m1b m2c) (* m1d m2d))
(+ (* m1a m2e) (* m1c m2f) m1e)
(+ (* m1b m2e) (* m1d m2f) m1f)))
([m1 m2 & others]
(reduce multiply (-old-multiply m1 m2) others)))
(defn add-translate
"Given two TRANSLATE matrixes (only e and f have significative
values), combine them. Quicker than multiplying them, for this

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) ")")))