Created
January 18, 2012 00:18
-
-
Save blcooley/1629970 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns testincanter.core | |
(:import (cern.colt.matrix.tdouble DoubleFactory2D DoubleMatrix2D) | |
(cern.jet.random.tdouble.engine DRand) | |
(cern.jet.math.tdouble DoubleFunctions) | |
(java.util Date))) | |
(defn test-multi [n] | |
(let [xs (.assign (.make DoubleFactory2D/dense n 23) (DRand. (Date.)))] | |
(time (let [result (.zMult xs xs nil 1 0 true false)] | |
[(.columns result) (.rows result)])))) | |
;; user> (test-multi 10000) | |
;; "Elapsed time: 7.377 msecs" | |
;; [23 23] | |
;; user> (test-multi 100000) | |
;; "Elapsed time: 240.411 msecs" | |
;; [23 23] | |
;; user> (test-multi 1000000) | |
;; "Elapsed time: 3871.375 msecs" | |
;; [23 23] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment