Which core.matrix implementation are you using? core.matrix is really just 
an API, and has a number of implementations. The default is not 
particularly fast, and uses vanilla nested Clojure vectors. However, you 
can also set up the Vectorz implementation which is typically fast enough 
for my needs. And there is also a clatrix implementation which uses a 
native library (I forget; BLAS? LAPAC?); That can be fast if you just have 
really big operations, but there is cost in translating Java data over to 
native data. For that reason, doing things that require a lot of iteration 
can sometimes get better performance using Vectorz.

https://github.com/mikera/core.matrix/wiki/Matrix-implementations

Chris


On Saturday, March 14, 2015 at 4:10:58 AM UTC-7, Byan Jati wrote:
>
> hello there, i want to ask about core.matrix dot product performance, is 
> there a technique to optimize dot-product function ? 
>
> Because i found that in Java, C, or even in HipHipArray library, the dot 
> product performance is extremely faster than core matrix dot product. I 
> conduct a little benchmark by looping the dot product function until 800000 
> steps, and i found in Java = 12 ms, C = 22 ms, and core.matrix = 1300 ms ( 
> if using core.matrix.dot ), if using hiphip array in clojure, i found its 
> resulting 300 ms for 800000 iteration dot-product. 
>
> Actually i want to use hiphip array and core matrix when executing the 
> core.matrix.dot-product, but the function dot-product demanding 
> double-array format for the input, which is also bottleneck process for 
> core.matrix because the row of matrix should be cast into double-array form 
> before running dot-product. 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to