-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look into using a library for matrix math #4
Comments
Big ODE4j fan here. I'm using jBLAS for matrix math in some projects that link to ODE4j. However, I haven't done any speed tests against MTJ. |
Hey, good to hear there are some fans :-), I get very little feedback. I just updated the title and issue text. I got the MTJ/EJML suggestion from another ode4j user. According to the comparison above, EJML is best for small matrices and MTJ-n is best for larger ones. EJML appears to be faster than jBLAS for matrices of all sizes. Of course, I guess it depends on which operations would actually be used. MTJ also appears to be based on BLAS. Anyway, this migration won't be happening anytime soon, unless there are volunteers? |
Alright, I'll think about volunteering, but can't promise anything at the moment. I'm back to considering this issue for some of my own code. It is a shame MTJ seems to do so poorly on small matrices. I'm taking hits from rotation ops and solving large matrix systems. That being said, I guess I'm sold on EJML for speeding up my rotations. So my vote goes for EJML. I wonder if it would be possible to cheaply and dynamically transition between the two libraries during runtime... [Actually, I may retract my vote for now. Rotations aren't a good enough reason, since they really should probably just be unrolled anyway.] |
Indeed, most of the 1x3, 1x4, 3x3, 3x4 and 4x4 operations are already unrolled. |
MTJ/MTJ-n:
https://github.com/fommil/matrix-toolkits-java
EJML:
http://code.google.com/p/efficient-java-matrix-library/
Comparison:
https://code.google.com/p/java-matrix-benchmark/wiki/RuntimeCorei7v2600_2013_10
Also, any inclusion of such libraries should consider that ODE partly takes special precautions to improve mathematical instability.
The text was updated successfully, but these errors were encountered: