Testing and Benchmarking

In this section we will show two built-in systems that allow you to test and benchmarking any fastmat Matrix implementation. Testing is important to verify that a certain implementation actually does what you’d expect of it and is virtually the essential cornerstone to writing your own user defined matrix class implementation.

The scope of the implemented testing system expands to these areas (not complete):

  • Testing of mathematical correctness
  • Testing of computational accuracy
  • Testing of various data types (and combinations thereof)
  • Testing of parameter combinations
  • Testing for different platforms ans versions (mostly done by our CI setup)

Benchmarking, however, is a valuable goodie to have in your toolbox to evaluate the performance of your implementation and to find culprits that impact the runtime or memory consumption of your implementation. Make sure to also tune in to out optimization section, where we detail on how to use the information gained from benchmarking your classes productively to improve your implementation.