Skip to content

kellpossible/java-vector-math-performance-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LICENSE | Project Documentation

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

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

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.

About

review performance for several methods/libraries available for vector/matrix math operations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages