Overview of MaxMath
masterMaxMath is a high-performance SIMD math library for Unity developers, built on top of Unity.Mathematics and optimized for Unity.Burst. It serves as a drop-in replacement/wrapper for Unity.Mathematics (as of version 3.0) while providing significantly more extensive functionality.
Key capabilities include:
- Expanded Primitive Support: Adds support for
(s)byte,(u)short, and(u)longvectors and matrices. - Wider SIMD Vectors: Supports up to 256-bit vectors (e.g.,
byte32,short16,int8,float8) for full hardware utilization. - Exotic Precision: Includes
(U)Int128(scalar), 128-bitquadrupleprecision floats (scalar), and 8-bitquarterprecision floats (scalar and vector). - Hardware Intrinsics: Written directly with ARM and x86 hardware intrinsics for optimal performance.
- Burst Integration: Deeply integrated with
Unity.Burstand LLVM, using semantic postconditions (Unity.Burst.CompilerServices.Hint.Assume()) to help the compiler propagate optimizations through opaque implementations.