-
Notifications
You must be signed in to change notification settings - Fork 0
JOML Comparison
| Feature | Jamma | JOML 1.10.8 |
|---|---|---|
| Vector mutability | Immutable (records) | Mutable |
| Vector types | 2d/f/i, 3d/f/i, 4d/f/i | 2d/f, 3d/f, 4d/f |
| Integer vectors | ✅ Vector2i, Vector3i, Vector4i
|
❌ |
| Matrix types | 2x2, 3x3, 4x4, 4x3 (d/f) | 2x2, 3x3, 4x4, 4x3 (d/f) |
| Quaternion | Record (immutable) | Mutable class |
| Dual numbers | ✅ DualNumberd/f
|
❌ |
| ScalarMath | 80+ methods | ❌ (only basic Math) |
| Easing functions | 34 functions | ❌ |
| Java records | ✅ All vectors & quaternions | ❌ |
| JPMS module-info | ✅ All modules | ❌ |
| MemorySegment I/O | ✅ All types | Partial (NIO only) |
| SIMD (Vector API) | ✅ Incubator module | ✅ (later versions) |
| Parallel batch ops | ✅ ParallelOps
|
❌ |
| Off-heap memory | ✅ MemoryOps
|
❌ |
Math.fma usage |
✅ All dot products, lerps, matrix mul | Partial |
| Thread safety | ✅ Trivially safe (records) | ❌ Not safe |
equals/hashCode |
✅ Correct (records) | ❌ Incomplete |
| LWJGL integration | ✅ lwjgl-jamma module |
✅ Native |
JOML uses mutable objects everywhere. v.add(w) mutates v. Jamma's records fix this — v.add(w) returns a new vector, v is untouched. No defensive copies, no thread safety issues, correct equals/hashCode.
JOML provides vector and matrix types and nothing else. Jamma's ScalarMath covers 80+ functions.
JOML has no Vector2i, Vector3i, or Vector4i. Jamma has all three.
Automatic differentiation is essential for gradient-based optimization and numerical methods.
JOML ships without module-info.java. Jamma is fully modular.
JOML relies on NIO buffers only. Jamma supports both NIO buffers and MemorySegment.
Jamma's incubator module provides SIMD vector ops and StructuredTaskScope-based parallelism.
Modern JVMs eliminate short-lived allocations via escape analysis. Generational ZGC collects them at sub-millisecond cost.