Collection-first scalar API. Plain [Float32], [Float16], [Int8], [U1x8], and other wrapper arrays work directly. Owning tensors. Tensor<T> owns its storage, produces views and spans without nested pointer closures, and drives the matrix kernel API. Explicit matrix views. MatrixView and MatrixSpan make strides and ownership visible. Reusable packed matrices. PackedMatrix owns its internal packed buffer and can be reused across repeated queries. Binary metrics. U1x8 packs 8 bits per byte; Hamming and Jaccard kernels operate directly on those packed words. MaxSim and ColBERT-style late interaction. MaxSimPackedMatrix and .maxSimPack() cover token-level late-interaction scoring. No hidden output allocation. You own the result buffers for matrix kernels. Low-precision wrappers. Storage wrappers preserve exact bits for bf16 and mini-float formats. Unaligned caller buffers are fine. Packing handles internal layout itself.
§ Ecosystem Comparison
| Feature | NumKong | Accelerate/vDSP | MLX |
|---|---|---|---|
| Operation families | dots, distances, binary, geospatial, MaxSim | dots, distances, FFT, some BLAS | matmul, elementwise, reductions, FFT |
| Precision | BFloat16 through sub-byte — Float8, Float6, packed bits; automatic widening; Kahan summation; 0 ULP in Float32/Float64 | Float32/Float64, limited Float16; no auto-widening; IEEE defaults | Float16/BFloat16/Float32; no Float8 or sub-byte; backend-dependent |
| Runtime SIMD dispatch | per call, the highest capability the CPU runs and the build holds, across x86, Arm, RISC-V | Apple-only, no runtime ISA selection | GPU dispatch only, no CPU ISA selection |
| Packed matrix, GEMM-like | PackedMatrix packs once, reused across query batches | BLAS GEMM available | GEMM via graph, implicit caching |
| Symmetric kernels, SYRK-like | dotsSymmetric, angularsSymmetric, etc. skip duplicate pairs, up to 2x speedup | cblas_ssyrk available for rank-k updates | no duplicate-pair skipping |
| Collection-based API | works with any RandomAccessCollection conforming type | pointer-based vDSP functions | MLXArray-based |
| Memory model | caller-owned buffers; Tensor/PackedMatrix own their storage | caller-managed via UnsafePointer | graph-managed; implicit allocation and caching |