Javafastcomplex is a fast complex number package for Java. Most existing complex number packages implement only immutable complex numbers, which is easy to understand given that immutable objects lead to more understandable code. Mutable complex numbers would avoid garbage-collection penalty and therefore be faster in calculations. Javafastcomplex implements both mutable and immutable complex numbers, and has a common interface for both, allowing users to write functions that can take either a mutable or an immutable complex number as an argument. Mutable complex numbers can then be used in the most performance-critical parts of the code with immutable complex numbers being used elsewhere. Performance improvement of mutable complex numbers is 10x in the best-case scenario and about 2x in real life complex number code. The package is released under the liberal MIT license.
Be the first to post a review of Javafastcomplex!