https://github.com/kellpossible/java-vector-math-performance-test
review performance for several methods/libraries available for vector/matrix math operations.
https://github.com/kellpossible/java-vector-math-performance-test
Last synced: about 1 year ago
JSON representation
review performance for several methods/libraries available for vector/matrix math operations.
- Host: GitHub
- URL: https://github.com/kellpossible/java-vector-math-performance-test
- Owner: kellpossible
- License: mit
- Created: 2018-05-12T06:41:49.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-12T10:53:36.000Z (about 8 years ago)
- Last Synced: 2025-01-29T10:15:41.239Z (over 1 year ago)
- Language: Java
- Homepage: https://kellpossible.github.io/libgdx-atc-sim/VectorLibraryPerformanceTest/VectorLibraryPerformanceTest.html
- Size: 860 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Vector Library Performance Test
The purpose of this performance test was to review several methods/libraries
available for vector/matrix math operations for use in
[libgdx-atc-sim](https://github.com/kellpossible/libgdx-atc-sim)
+ [Apache commons-math](https://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/geometry/euclidean/threed/Vector3D.html)
+ [Pythagoras Library](https://github.com/samskivert/pythagoras)
+ [Yeppp! Library](http://www.yeppp.info/)
+ LWJGL OpenCL (TODO)
Vector classes using double precision floating point numbers were used. Where
classes were missing, a plain java alternative was implemented.
## Performance Test Results
| Benchmark | Samples | Score | Error | units |
|-------------------|---------|-------|---------|-------|
| testApacheCommons | 20 | 1.916 | ± 0.428 | ops/s |
| testPythagoras | 20 | 7.572 | ± 0.355 | ops/s |
| testYepp | 20 | 0.205 | ± 0.001 | ops/s |
## Review of Libraries
### Apache commons-math
+ \+ lots of other classes we may want to use
+ \- bloated
+ \~ performance is okay but not the best.
### Pythagoras
The Pythagoras has the best performance. It is also small
+ \+ very small
+ \+ performance
+ \- no unit tests for double class
### Yeppp!
Yeppp doesn't have the best performance for our application, and we'd have alter
the design to cater for performance to get any kind of benefit.
+ \+ small
+ \+ popular
+ \- poor performance in java and for our application
[c++ - Performance with Yeppp! is slower than native implementation - Stack Overflow](http://stackoverflow.com/questions/26504111/performance-with-yeppp-is-slower-than-native-implementation)
> Yeppp! is optimized for processing arrays of 100+ elements.
> It is not efficient on small arrays (like length-3 array in your example)
> due to limited ability to use SIMD and overheads of function call, dynamic
> dispatching, and parameter checks.